Add Py_RETURN_NOTIMPLEMENTED macro. Fixes #12724.

This commit is contained in:
Brian Curtin 2011-08-10 20:05:21 -05:00
parent 257a1d0f28
commit 7d2f9e1342
1 changed files with 4 additions and 0 deletions

View File

@ -792,6 +792,10 @@ not implemented for a given type combination.
PyAPI_DATA(PyObject) _Py_NotImplementedStruct; /* Don't use this directly */
#define Py_NotImplemented (&_Py_NotImplementedStruct)
/* Macro for returning Py_NotImplemented from a function */
#define Py_RETURN_NOTIMPLEMENTED \
return Py_INCREF(Py_NotImplemented), Py_NotImplemented
/* Rich comparison opcodes */
#define Py_LT 0
#define Py_LE 1