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

Skip to content

Commit 8c46b30

Browse files
committed
Document PyObject_AsFileDescriptor
1 parent 06051ed commit 8c46b30

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

Doc/api/api.tex

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,6 +1419,13 @@ \section{Object Protocol \label{object}}
14191419
\var{o}[\var{key}]}.
14201420
\end{cfuncdesc}
14211421

1422+
\begin{cfuncdesc}{int}{PyObject_AsFileDescriptor}{PyObject *o}
1423+
Derives a file-descriptor from a Python object. If the object
1424+
is an integer or long integer, its value is returned. If not, the
1425+
object's \method{fileno()} method is called if it exists; the method
1426+
must return an integer or long integer, which is returned as the file
1427+
descriptor value. Returns \code{-1} on failure.
1428+
\end{cfuncdesc}
14221429

14231430
\section{Number Protocol \label{number}}
14241431

Doc/api/refcounts.dat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,9 @@ PyNumber_Xor:PyObject*:o2:0:
539539
PyOS_GetLastModificationTime:long:::
540540
PyOS_GetLastModificationTime:char*:filename::
541541

542+
PyObject_AsFileDescriptor:int:::
543+
PyObject_AsFileDescriptor:PyObject*:o:0:
544+
542545
PyObject_CallFunction:PyObject*::+1:
543546
PyObject_CallFunction:PyObject*:callable_object:0:
544547
PyObject_CallFunction:char*:format::

0 commit comments

Comments
 (0)