Mention Py_RETURN_NONE when introducing the idiom of how to have a function

return Py_None.
This commit is contained in:
Brett Cannon 2004-06-27 04:28:00 +00:00
parent ebd95222bf
commit 634893d1a3

View file

@ -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);