From 479590be63d0013cb87230e0d6f7f1613deea62e Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Mon, 4 May 2009 15:08:47 -0700 Subject: [PATCH] wmain and wchar_t for windows main function --- Cython/Compiler/ModuleNode.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index d5f79953..299f30cb 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -2471,7 +2471,11 @@ static __Pyx_RefnannyAPIStruct *__Pyx_Refnanny = NULL; main_method = UtilityCode( impl = """ +#if PY_MAJOR_VERSION < 3 || (!defined(WIN32) && !defined(MS_WINDOWS)) int main(int argc, char** argv) { +#else +int wmain(int argc, wchar_t **argv) { +#endif int r = 0; PyObject* m = NULL; Py_SetProgramName(argv[0]); -- 2.26.2