[Python-Dev] check for PyUnicode_READY look backwards (original) (raw)
Amaury Forgeot d'Arc amauryfa at gmail.com
Fri Oct 7 00:07:58 CEST 2011
- Previous message: [Python-Dev] check for PyUnicode_READY look backwards
- Next message: [Python-Dev] check for PyUnicode_READY look backwards
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
2011/10/6 Benjamin Peterson <benjamin at 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 (!PyUnicodeREADY(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
- Previous message: [Python-Dev] check for PyUnicode_READY look backwards
- Next message: [Python-Dev] check for PyUnicode_READY look backwards
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]