Commit a2135097 authored by Victor Stinner's avatar Victor Stinner

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

parent ee85a1d3
......@@ -44,6 +44,8 @@ main(int argc, char **argv)
#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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment