##// END OF EJS Templates
exewrapper: format with clang-format...
Augie Fackler -
r34637:31c6c4d2 default
parent child Browse files
Show More
@@ -23,7 +23,6 b' int strcpy_s(char *d, size_t n, const ch'
23 23 }
24 24 #endif
25 25
26
27 26 static char pyscript[MAX_PATH + 10];
28 27 static char pyhome[MAX_PATH + 10];
29 28 static char envpyhome[MAX_PATH + 10];
@@ -40,11 +39,10 b' int main(int argc, char *argv[])'
40 39 HANDLE hfind;
41 40 const char *err;
42 41 HMODULE pydll;
43 void (__cdecl *Py_SetPythonHome)(char *home);
44 int (__cdecl *Py_Main)(int argc, char *argv[]);
42 void(__cdecl * Py_SetPythonHome)(char *home);
43 int(__cdecl * Py_Main)(int argc, char *argv[]);
45 44
46 if (GetModuleFileName(NULL, pyscript, sizeof(pyscript)) == 0)
47 {
45 if (GetModuleFileName(NULL, pyscript, sizeof(pyscript)) == 0) {
48 46 err = "GetModuleFileName failed";
49 47 goto bail;
50 48 }
@@ -87,10 +85,12 b' int main(int argc, char *argv[])'
87 85 strcat_s(pydllfile, sizeof(pydllfile), "\\" HGPYTHONLIB ".dll");
88 86 pydll = LoadLibrary(pydllfile);
89 87 if (pydll == NULL) {
90 err = "failed to load private Python DLL " HGPYTHONLIB ".dll";
88 err = "failed to load private Python DLL " HGPYTHONLIB
89 ".dll";
91 90 goto bail;
92 91 }
93 Py_SetPythonHome = (void*)GetProcAddress(pydll, "Py_SetPythonHome");
92 Py_SetPythonHome =
93 (void *)GetProcAddress(pydll, "Py_SetPythonHome");
94 94 if (Py_SetPythonHome == NULL) {
95 95 err = "failed to get Py_SetPythonHome";
96 96 goto bail;
@@ -106,7 +106,7 b' int main(int argc, char *argv[])'
106 106 }
107 107 }
108 108
109 Py_Main = (void*)GetProcAddress(pydll, "Py_Main");
109 Py_Main = (void *)GetProcAddress(pydll, "Py_Main");
110 110 if (Py_Main == NULL) {
111 111 err = "failed to get Py_Main";
112 112 goto bail;
@@ -133,7 +133,7 b' int main(int argc, char *argv[])'
133 133 name of our exe (argv[0]) in the position where the python.exe
134 134 canonically is, and insert the pyscript next.
135 135 */
136 pyargv = malloc((argc + 5) * sizeof(char*));
136 pyargv = malloc((argc + 5) * sizeof(char *));
137 137 if (pyargv == NULL) {
138 138 err = "not enough memory";
139 139 goto bail;
General Comments 0
You need to be logged in to leave comments. Login now