commit | a21350976e5436f49074141794fe8614931c268c | [log] [tgz] |
---|---|---|
author | Victor Stinner <victor.stinner@haypocalc.com> | Wed Oct 13 22:36:16 2010 +0000 |
committer | Victor Stinner <victor.stinner@haypocalc.com> | Wed Oct 13 22:36:16 2010 +0000 |
tree | cd8bae276e9bf4057e2e79ddf8c8cfd928f36cb2 | |
parent | ee85a1d3bb8ac76c9bbb756d30b9e2110c5137d3 [diff] [blame] |
main(): catch PyUnicode_FromString() failure (exit)
diff --git a/Modules/python.c b/Modules/python.c index 540bcfe..488aa79 100644 --- a/Modules/python.c +++ b/Modules/python.c
@@ -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