diff Doc/api/api.tex @ 13592:9ca50e2433eb legacy-trunk

Document PyObject_AsFileDescriptor
author Andrew M. Kuchling <amk@amk.ca>
date Thu, 13 Jul 2000 23:58:16 +0000
parents 4cf21852fd52
children d057cd543ed9
line wrap: on
line diff
--- a/Doc/api/api.tex	Thu Jul 13 23:56:54 2000 +0000
+++ b/Doc/api/api.tex	Thu Jul 13 23:58:16 2000 +0000
@@ -1419,6 +1419,13 @@
 \var{o}[\var{key}]}.
 \end{cfuncdesc}
 
+\begin{cfuncdesc}{int}{PyObject_AsFileDescriptor}{PyObject *o}
+Derives a file-descriptor from a Python object.  If the object
+is an integer or long integer, its value is returned.  If not, the
+object's \method{fileno()} method is called if it exists; the method
+must return an integer or long integer, which is returned as the file
+descriptor value.  Returns \code{-1} on failure.
+\end{cfuncdesc}
 
 \section{Number Protocol \label{number}}