From 7d2f9e13424fe74814e14cf92d7bbd779917a5c5 Mon Sep 17 00:00:00 2001 From: Brian Curtin Date: Wed, 10 Aug 2011 20:05:21 -0500 Subject: Add Py_RETURN_NOTIMPLEMENTED macro. Fixes #12724. --- Include/object.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Include/object.h b/Include/object.h index 3753785..e0c68c1 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 -- cgit v0.12