From: Lisandro Dalcin Date: Fri, 25 Feb 2011 16:13:37 +0000 (-0300) Subject: fixes and cleanups in __Pyx_main() X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d153d8595fa8b413d428de9d48ddb6907733229f;p=cython.git fixes and cleanups in __Pyx_main() --- diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 72d1074b..a66d43b7 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -2678,7 +2678,8 @@ static int __Pyx_main(int argc, wchar_t **argv) { if (argc && argv) Py_SetProgramName(argv[0]); Py_Initialize(); - PySys_SetArgv(argc, argv); + if (argc && argv) + PySys_SetArgv(argc, argv); { /* init module '%(module_name)s' as '__main__' */ PyObject* m = NULL; %(module_is_main)s = 1;