gave wxTheApp->argv a real set of values
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -164,8 +164,16 @@ PyObject* __wxStart(PyObject* /* self */, PyObject* args)
|
||||
|
||||
|
||||
// This is the next part of the wxEntry functionality...
|
||||
wxPythonApp->argc = 0;
|
||||
wxPythonApp->argv = NULL;
|
||||
PyObject* sysargv = PySys_GetObject("argv");
|
||||
int argc = PyList_Size(sysargv);
|
||||
char** argv = new char*[argc+1];
|
||||
int x;
|
||||
for(x=0; x<argc; x++)
|
||||
argv[x] = PyString_AsString(PyList_GetItem(sysargv, x));
|
||||
argv[argc] = NULL;
|
||||
|
||||
wxPythonApp->argc = argc;
|
||||
wxPythonApp->argv = argv;
|
||||
|
||||
wxEntryInitGui();
|
||||
|
||||
|
Reference in New Issue
Block a user