Oct. 6, 2011
10:07 p.m.
2011/10/6 Benjamin Peterson <benjamin@python.org>:
Why not just have it return 0 on error? This would be more consistent with API functions that return "false" values like NULL and would just be
if (!PyUnicode_READY(s)) return NULL;
Most functions of the Python C API seems to follow one of two ways to indicate an error: - functions that return PyObject* will return NULL - functions that return an int will return -1 -- Amaury Forgeot d'Arc