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

Skip to content

Commit 0e0b618

Browse files
committed
Add documentation for PyObject_Call().
Note that PyObject_Size() is a synonym for PyObject_Length(). This closes SF patch #544330 (contributed by Thomas Heller).
1 parent 34adb8a commit 0e0b618

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

Doc/api/abstract.tex

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,21 @@ \section{Object Protocol \label{object}}
172172
\end{cfuncdesc}
173173

174174

175+
\begin{cfuncdesc}{PyObject*}{PyObject_Call}{PyObject *callable_object,
176+
PyObject *args,
177+
PyObject *kw}
178+
Call a callable Python object \var{callable_object}, with arguments
179+
given by the tuple \var{args}, and named arguments given by the
180+
dictionary \var{kw}. If no named arguments are needed, \var{kw} may
181+
be \NULL{}. \var{args} must not be \NULL{}, use an empty tuple if
182+
no arguments are needed. Returns the result of the call on success,
183+
or \NULL{} on failure. This is the equivalent of the Python
184+
expression \samp{apply(\var{callable_object}, \var{args}, \var{kw})}
185+
or \samp{\var{callable_object}(*\var{args}, **\var{kw})}.
186+
\bifuncindex{apply}
187+
\end{cfuncdesc}
188+
189+
175190
\begin{cfuncdesc}{PyObject*}{PyObject_CallObject}{PyObject *callable_object,
176191
PyObject *args}
177192
Call a callable Python object \var{callable_object}, with arguments
@@ -261,6 +276,7 @@ \section{Object Protocol \label{object}}
261276
\end{cfuncdesc}
262277

263278
\begin{cfuncdesc}{int}{PyObject_Length}{PyObject *o}
279+
\cfuncline{int}{PyObject_Size}{PyObject *o}
264280
Return the length of object \var{o}. If the object \var{o} provides
265281
both sequence and mapping protocols, the sequence length is
266282
returned. On error, \code{-1} is returned. This is the equivalent

0 commit comments

Comments
 (0)