diff options
author | Georg Brandl <georg@python.org> | 2007-10-23 18:26:17 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-10-23 18:26:17 (GMT) |
commit | 083bea49a8b74a5f758c6641c299f0cc8c114616 (patch) | |
tree | a89b9c539cda872e733149ea48e610b974bd3c32 /Doc/c-api/concrete.rst | |
parent | b6538a86bae16b47b55af1e6cc2c8cf76c30f7e1 (diff) | |
download | cpython-083bea49a8b74a5f758c6641c299f0cc8c114616.zip cpython-083bea49a8b74a5f758c6641c299f0cc8c114616.tar.gz cpython-083bea49a8b74a5f758c6641c299f0cc8c114616.tar.bz2 |
Remove duplicate entry for PyObject_AsFileDescriptor.
Diffstat (limited to 'Doc/c-api/concrete.rst')
-rw-r--r-- | Doc/c-api/concrete.rst | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Doc/c-api/concrete.rst b/Doc/c-api/concrete.rst index 1855688..f492f16 100644 --- a/Doc/c-api/concrete.rst +++ b/Doc/c-api/concrete.rst @@ -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) |