mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-08 18:02:05 +03:00
return returncode correctly
Reviewed By: xavierd Differential Revision: D23434438 fbshipit-source-id: 813f987cf62e72c0b6704b31e6e9168006735b6f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
92b1ab7f6d
commit
29244950fe
@@ -50,11 +50,12 @@ int locate_py_main(int argc, wchar_t **argv) {
|
|||||||
|
|
||||||
python_dll = LoadLibraryExW(L"python3.dll", NULL, LOAD_LIBRARY_SEARCH_DEFAULT_DIRS);
|
python_dll = LoadLibraryExW(L"python3.dll", NULL, LOAD_LIBRARY_SEARCH_DEFAULT_DIRS);
|
||||||
|
|
||||||
|
int returncode = 0;
|
||||||
if (python_dll != NULL) {
|
if (python_dll != NULL) {
|
||||||
pymain = (Py_Main) GetProcAddress(python_dll, "Py_Main");
|
pymain = (Py_Main) GetProcAddress(python_dll, "Py_Main");
|
||||||
|
|
||||||
if (pymain != NULL) {
|
if (pymain != NULL) {
|
||||||
(pymain)(argc, argv);
|
returncode = (pymain)(argc, argv);
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "error: %d unable to load Py_Main\n", GetLastError());
|
fprintf(stderr, "error: %d unable to load Py_Main\n", GetLastError());
|
||||||
}
|
}
|
||||||
@@ -64,7 +65,7 @@ int locate_py_main(int argc, wchar_t **argv) {
|
|||||||
fprintf(stderr, "error: %d unable to locate python3.dll\n", GetLastError());
|
fprintf(stderr, "error: %d unable to locate python3.dll\n", GetLastError());
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return returncode;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wmain() {
|
int wmain() {
|
||||||
|
Reference in New Issue
Block a user