From: Brian Curtin Date: Thu, 11 Aug 2011 01:05:21 +0000 (-0500) Subject: Add Py_RETURN_NOTIMPLEMENTED macro. Fixes #12724. X-Git-Tag: v3.3.0a1~1721 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7d2f9e13424fe74814e14cf92d7bbd779917a5c5;p=thirdparty%2FPython%2Fcpython.git Add Py_RETURN_NOTIMPLEMENTED macro. Fixes #12724. --- diff --git a/Include/object.h b/Include/object.h index 37537859668d..e0c68c133d6e 100644 --- a/Include/object.h +++ b/Include/object.h @@ -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