From: Antoine Pitrou Date: Sun, 13 Mar 2011 18:32:01 +0000 (+0100) Subject: Remove documentation to non-existent function PyObject_CopyToObject (fixes #11478) X-Git-Tag: v3.2.1b1~316 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=34db4698958c64436de3a16fd5abf7224557492f;p=python Remove documentation to non-existent function PyObject_CopyToObject (fixes #11478) --- 34db4698958c64436de3a16fd5abf7224557492f diff --cc Doc/c-api/buffer.rst index e4c32093e2,094f7f2239..5a34bc09ee --- a/Doc/c-api/buffer.rst +++ b/Doc/c-api/buffer.rst @@@ -298,27 -300,13 +298,13 @@@ Buffer-related function longer being used as it may free memory from it. -.. cfunction:: Py_ssize_t PyBuffer_SizeFromFormat(const char *) +.. c:function:: Py_ssize_t PyBuffer_SizeFromFormat(const char *) - Return the implied :cdata:`~Py_buffer.itemsize` from the struct-stype - :cdata:`~Py_buffer.format`. + Return the implied :c:data:`~Py_buffer.itemsize` from the struct-stype + :c:data:`~Py_buffer.format`. - .. c:function:: int PyObject_CopyToObject(PyObject *obj, void *buf, Py_ssize_t len, char fortran) - - Copy *len* bytes of data pointed to by the contiguous chunk of memory - pointed to by *buf* into the buffer exported by obj. The buffer must of - course be writable. Return 0 on success and return -1 and raise an error - on failure. If the object does not have a writable buffer, then an error - is raised. If *fortran* is ``'F'``, then if the object is - multi-dimensional, then the data will be copied into the array in - Fortran-style (first dimension varies the fastest). If *fortran* is - ``'C'``, then the data will be copied into the array in C-style (last - dimension varies the fastest). If *fortran* is ``'A'``, then it does not - matter and the copy will be made in whatever way is more efficient. - - -.. cfunction:: int PyBuffer_IsContiguous(Py_buffer *view, char fortran) +.. c:function:: int PyBuffer_IsContiguous(Py_buffer *view, char fortran) Return 1 if the memory defined by the *view* is C-style (*fortran* is ``'C'``) or Fortran-style (*fortran* is ``'F'``) contiguous or either one