From: Brett Cannon Date: Sun, 27 Jun 2004 04:28:00 +0000 (+0000) Subject: Mention Py_RETURN_NONE when introducing the idiom of how to have a function X-Git-Tag: v2.4a1~118 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=634893d1a38e5ffec3a86f32d80e7d986108d8ce;p=thirdparty%2FPython%2Fcpython.git Mention Py_RETURN_NONE when introducing the idiom of how to have a function return Py_None. --- diff --git a/Doc/ext/extending.tex b/Doc/ext/extending.tex index 57adc15b5c68..c3d3ab00fd99 100644 --- a/Doc/ext/extending.tex +++ b/Doc/ext/extending.tex @@ -290,7 +290,8 @@ are objects on the heap in Python!) If you have a C function that returns no useful argument (a function returning \ctype{void}), the corresponding Python function must return -\code{None}. You need this idiom to do so: +\code{None}. You need this idiom to do so (which is implemented by the +\csimplemacro{Py_RETURN_NONE} macro): \begin{verbatim} Py_INCREF(Py_None);