Mercurial > cpython-lru_cache-weakref
diff Modules/python.c @ 65275:e9ea09787a35
main(): catch PyUnicode_FromString() failure (exit)
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Wed, 13 Oct 2010 22:36:16 +0000 |
| parents | 3335edce48a3 |
| children | 49df778889e6 |
line wrap: on
line diff
--- a/Modules/python.c Wed Oct 13 22:20:15 2010 +0000 +++ b/Modules/python.c Wed Oct 13 22:36:16 2010 +0000 @@ -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
