From d153d8595fa8b413d428de9d48ddb6907733229f Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Fri, 25 Feb 2011 13:13:37 -0300 Subject: [PATCH] fixes and cleanups in __Pyx_main() --- Cython/Compiler/ModuleNode.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.26.2