From: Lisandro Dalcin Date: Mon, 27 Sep 2010 15:30:19 +0000 (-0300) Subject: Update special methods for buffer interface (PEP 3118 and legacy) X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=27b459a1a452861541d4b29df58c2c6adcd1c947;p=cython.git Update special methods for buffer interface (PEP 3118 and legacy) --- diff --git a/src/userguide/special_methods.rst b/src/userguide/special_methods.rst index 2186ad5d..01d11f8b 100644 --- a/src/userguide/special_methods.rst +++ b/src/userguide/special_methods.rst @@ -322,19 +322,30 @@ Iterators | __next__ | self | object | Get next item (called next in Python) | +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ -Buffer interface (no Python equivalents - see note 1) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Buffer interface [PEP 3118] (no Python equivalents - see note 1) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ -| Name | Parameters | Return type | Description | +| Name | Parameters | Return type | Description | ++=======================+=======================================+=============+=====================================================+ +| __getbuffer__ | self, Py_buffer `*view`, int flags | | | ++-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ +| __releasebuffer__ | self, Py_buffer `*view` | | | ++-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ + +Buffer interface [legacy] (no Python equivalents - see note 1) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ++-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ +| Name | Parameters | Return type | Description | +=======================+=======================================+=============+=====================================================+ -| __getreadbuffer__ | self, int i, void `**p` | | | +| __getreadbuffer__ | self, Py_ssize_t i, void `**p` | | | +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ -| __getwritebuffer__ | self, int i, void `**p` | | | +| __getwritebuffer__ | self, Py_ssize_t i, void `**p` | | | +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ -| __getsegcount__ | self, int `*p` | | | +| __getsegcount__ | self, Py_ssize_t `*p` | | | +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ -| __getcharbuffer__ | self, int i, char `**p` | | | +| __getcharbuffer__ | self, Py_ssize_t i, char `**p` | | | +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ Descriptor objects (see note 2)