mirror of
https://github.com/thp/pyotherside.git
synced 2025-01-28 23:52:55 +08:00
Merge pull request #106 from uglide/patch-1
Fix compilation on Windows with VS 2017
This commit is contained in:
commit
1a32320c93
@ -519,10 +519,11 @@ QPythonPriv::QPythonPriv()
|
||||
|
||||
// Initialize sys.argv (https://github.com/thp/pyotherside/issues/77)
|
||||
int argc = 1;
|
||||
wchar_t *argv[argc];
|
||||
wchar_t **argv = (wchar_t **)malloc(argc * sizeof(wchar_t *));
|
||||
argv[0] = Py_DecodeLocale("", nullptr);
|
||||
PySys_SetArgvEx(argc, argv, 0);
|
||||
PyMem_RawFree((void *)argv[0]);
|
||||
free(argv);
|
||||
|
||||
locals = PyObjectRef(PyDict_New(), true);
|
||||
assert(locals);
|
||||
|
Loading…
x
Reference in New Issue
Block a user