Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 847f375

Browse files
author
Michael W. Hudson
committed
Correct lie about METH_NOARGS functions.
Backport candidate.
1 parent 90e05b0 commit 847f375

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Doc/api/newtypes.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ \section{Common Object Structures \label{common-structs}}
244244
\cfunction{Py_InitModule()} was used). The second parameter
245245
(often called \var{args}) is a tuple object representing all
246246
arguments. This parameter is typically processed using
247-
\cfunction{PyArg_ParseTuple()}.
247+
\cfunction{PyArg_ParseTuple()} or \cfunction{PyArg_UnpackTuple}.
248248
\end{datadesc}
249249

250250
\begin{datadesc}{METH_KEYWORDS}
@@ -259,10 +259,10 @@ \section{Common Object Structures \label{common-structs}}
259259
\begin{datadesc}{METH_NOARGS}
260260
Methods without parameters don't need to check whether arguments are
261261
given if they are listed with the \constant{METH_NOARGS} flag. They
262-
need to be of type \ctype{PyNoArgsFunction}: they expect a single
263-
single \ctype{PyObject*} as a parameter. When used with object
264-
methods, this parameter is typically named \code{self} and will hold
265-
a reference to the object instance.
262+
need to be of type \ctype{PyCFunction}. When used with object
263+
methods, the first parameter is typically named \code{self} and will
264+
hold a reference to the object instance. In all cases the second
265+
parameter will be \NULL.
266266
\end{datadesc}
267267

268268
\begin{datadesc}{METH_O}

0 commit comments

Comments
 (0)