[Python-checkins] r85440 - python/branches/py3k/Modules/python.c

victor.stinner python-checkins at python.org
Thu Oct 14 00:36:16 CEST 2010


Author: victor.stinner
Date: Thu Oct 14 00:36:16 2010
New Revision: 85440

Log:
main(): catch PyUnicode_FromString() failure (exit)


Modified:
   python/branches/py3k/Modules/python.c

Modified: python/branches/py3k/Modules/python.c
==============================================================================
--- python/branches/py3k/Modules/python.c	(original)
+++ python/branches/py3k/Modules/python.c	Thu Oct 14 00:36:16 2010
@@ -44,6 +44,8 @@
 #ifdef __APPLE__
         /* Use utf-8 on Mac OS X */
         PyObject *unicode = PyUnicode_FromString(argv[i]);
+        if (!unicode)
+            return 1;
         argv_copy[i] = PyUnicode_AsWideCharString(unicode, NULL);
         Py_DECREF(unicode);
 #else


More information about the Python-checkins mailing list