]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove duplicate entry for PyObject_AsFileDescriptor.
authorGeorg Brandl <georg@python.org>
Tue, 23 Oct 2007 18:26:17 +0000 (18:26 +0000)
committerGeorg Brandl <georg@python.org>
Tue, 23 Oct 2007 18:26:17 +0000 (18:26 +0000)
Doc/c-api/abstract.rst
Doc/c-api/concrete.rst

index 515150d4594208c9607c7fe85634cbec33ee6534..4a786504779dcaa09696952666e1a02b3c23ec21 100644 (file)
@@ -327,10 +327,7 @@ is considered sufficient for this determination.
 
 .. cfunction:: 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 :meth:`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 ``-1`` on failure.
+   Derives a file-descriptor from a Python object.
 
 
 .. cfunction:: PyObject* PyObject_Dir(PyObject *o)
index 1855688a2cc611cbdefe68ba6334ba24d45a7d72..f492f160fc7f8dacf2a0b41d53bd41fdda216101 100644 (file)
@@ -2420,13 +2420,17 @@ change in future releases of Python.
    .. warning::
 
      Take care when you are mixing streams and descriptors! For more 
-     information, see `GNU C Library
+     information, see `the GNU C Library docs
      <http://www.gnu.org/software/libc/manual/html_node/Stream_002fDescriptor-Precautions.html#Stream_002fDescriptor-Precautions>`_.
 
 
 .. cfunction:: int PyObject_AsFileDescriptor(PyObject *p)
 
-   Return the file descriptor associated with *p* as an :ctype:`int`.
+   Return the file descriptor associated with *p* as an :ctype:`int`.  If the
+   object is an integer or long integer, its value is returned.  If not, the
+   object's :meth:`fileno` method is called if it exists; the method must return
+   an integer, which is returned as the file descriptor value.  Sets an
+   exception and returns ``-1`` on failure.
 
 
 .. cfunction:: PyObject* PyFile_GetLine(PyObject *p, int n)