[Python-checkins] (no subject)
Stéphane Wirtel
webhook-mailer at python.org
Wed Sep 11 13:10:27 EDT 2019
To: python-checkins at python.org
Subject: bpo-37750: Add doc of PyBuffer_FromContiguous (GH-15988) (GH-15991)
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
https://github.com/python/cpython/commit/c112faff158a05c1e71f9e1957364ed756ef=
bcde
commit: c112faff158a05c1e71f9e1957364ed756efbcde
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.co=
m>
committer: St=C3=A9phane Wirtel <stephane at wirtel.be>
date: 2019-09-11T19:10:23+02:00
summary:
bpo-37750: Add doc of PyBuffer_FromContiguous (GH-15988) (GH-15991)
https://bugs.python.org/issue37750
Automerge-Triggered-By: @matrixise
(cherry picked from commit 5a56ce4a0e820fefcd598b94715a7ff7e199858d)
Co-authored-by: Hai Shi <shihai1992 at gmail.com>
files:
M Doc/c-api/buffer.rst
diff --git a/Doc/c-api/buffer.rst b/Doc/c-api/buffer.rst
index 71e5b32f1fe5..19ec7aaadfa7 100644
--- a/Doc/c-api/buffer.rst
+++ b/Doc/c-api/buffer.rst
@@ -481,6 +481,13 @@ Buffer-related functions
*indices* must point to an array of ``view->ndim`` indices.
=20
=20
+.. c:function:: int PyBuffer_FromContiguous(Py_buffer *view, void *buf, Py_s=
size_t len, char fort)
+
+ Copy contiguous *len* bytes from *buf* to *view*.
+ *fort* can be ``'C'`` or ``'F'`` (for C-style or Fortran-style ordering).
+ ``0`` is returned on success, ``-1`` on error.
+
+
.. c:function:: int PyBuffer_ToContiguous(void *buf, Py_buffer *src, Py_ssiz=
e_t len, char order)
=20
Copy *len* bytes from *src* to its contiguous representation in *buf*.
More information about the Python-checkins
mailing list