File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
build/fbcode_builder/CMake Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -50,11 +50,12 @@ int locate_py_main(int argc, wchar_t **argv) {
50
50
51
51
python_dll = LoadLibraryExW (L"python3.dll" , NULL , LOAD_LIBRARY_SEARCH_DEFAULT_DIRS );
52
52
53
+ int returncode = 0 ;
53
54
if (python_dll != NULL ) {
54
55
pymain = (Py_Main ) GetProcAddress (python_dll , "Py_Main" );
55
56
56
57
if (pymain != NULL ) {
57
- (pymain )(argc , argv );
58
+ returncode = (pymain )(argc , argv );
58
59
} else {
59
60
fprintf (stderr , "error: %d unable to load Py_Main\n" , GetLastError ());
60
61
}
@@ -64,7 +65,7 @@ int locate_py_main(int argc, wchar_t **argv) {
64
65
fprintf (stderr , "error: %d unable to locate python3.dll\n" , GetLastError ());
65
66
return 1 ;
66
67
}
67
- return 0 ;
68
+ return returncode ;
68
69
}
69
70
70
71
int wmain () {
You can’t perform that action at this time.
0 commit comments