cpython: 04065efd7747 (original) (raw)

Mercurial > cpython

changeset 104749:04065efd7747 3.5

Issue #28496: Mark up constants 0, 1 and -1 that denote return values or special input values as literal text. [#28496]

Serhiy Storchaka storchaka@gmail.com
date Thu, 27 Oct 2016 21:41:19 +0300
parents bea48e72cae5
children de00be368f0b e880a93662c8
files Doc/c-api/arg.rst Doc/c-api/buffer.rst Doc/c-api/capsule.rst Doc/c-api/import.rst Doc/c-api/init.rst Doc/c-api/long.rst Doc/c-api/number.rst Doc/c-api/set.rst Doc/c-api/slice.rst Doc/c-api/structures.rst Doc/c-api/typeobj.rst Doc/c-api/unicode.rst
diffstat 12 files changed, 64 insertions(+), 64 deletions(-)[+] [-] Doc/c-api/arg.rst 2 Doc/c-api/buffer.rst 12 Doc/c-api/capsule.rst 10 Doc/c-api/import.rst 4 Doc/c-api/init.rst 24 Doc/c-api/long.rst 4 Doc/c-api/number.rst 2 Doc/c-api/set.rst 8 Doc/c-api/slice.rst 6 Doc/c-api/structures.rst 2 Doc/c-api/typeobj.rst 6 Doc/c-api/unicode.rst 48

line wrap: on

line diff

--- a/Doc/c-api/arg.rst +++ b/Doc/c-api/arg.rst @@ -342,7 +342,7 @@ Other objects p (:class:bool) [int] Tests the value passed in for truth (a boolean p\ redicate) and converts the result to its equivalent C true/false integer value.

--- a/Doc/c-api/buffer.rst +++ b/Doc/c-api/buffer.rst @@ -156,7 +156,7 @@ a buffer, see :c:func:`PyObject_GetBuffe .. c:member:: int ndim The number of dimensions the memory represents as an n-dimensional array.

@@ -427,7 +427,7 @@ Buffer-related functions .. c:function:: int PyObject_CheckBuffer(PyObject *obj)

@@ -437,7 +437,7 @@ Buffer-related functions Send a request to exporter to fill in view as specified by flags. If the exporter cannot provide a buffer of the exact type, it MUST raise :c:data:PyExc_BufferError, set :c:member:view->obj to NULL and

.. c:function:: int PyBuffer_IsContiguous(Py_buffer *view, char order)

.. c:function:: void PyBuffer_FillContiguousStrides(int ndim, Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t itemsize, char order) @@ -492,7 +492,7 @@ Buffer-related functions On success, set :c:member:view->obj to a new reference to exporter and return 0. Otherwise, raise :c:data:PyExc_BufferError, set

--- a/Doc/c-api/capsule.rst +++ b/Doc/c-api/capsule.rst @@ -120,19 +120,19 @@ Refer to :ref:using-capsules for more guaranteed to succeed. Return a nonzero value if the object is valid and matches the name passed in.

.. c:function:: int PyCapsule_SetContext(PyObject *capsule, void *context) Set the context pointer inside capsule to context.

.. c:function:: int PyCapsule_SetDestructor(PyObject *capsule, PyCapsule_Destructor destructor) Set the destructor inside capsule to destructor.

.. c:function:: int PyCapsule_SetName(PyObject *capsule, const char *name) @@ -140,11 +140,11 @@ Refer to :ref:using-capsules for more outlive the capsule. If the previous name stored in the capsule was not NULL, no attempt is made to free it.

.. c:function:: int PyCapsule_SetPointer(PyObject *capsule, void *pointer) Set the void pointer inside capsule to pointer. The pointer may not be NULL.

--- a/Doc/c-api/import.rst +++ b/Doc/c-api/import.rst @@ -185,10 +185,10 @@ Importing Modules Return the magic number for Python bytecode files (a.k.a. :file:.pyc file). The magic number should be present in the first four bytes of the bytecode

.. c:function:: const char * PyImport_GetMagicTag()

--- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@ -44,8 +44,8 @@ Initializing and finalizing the interpre .. c:function:: void Py_InitializeEx(int initsigs)

@@ -114,7 +114,7 @@ Process-wide parameters If :c:func:Py_Finalize is called, this function will need to be called again in order to affect subsequent calls to :c:func:Py_Initialize.

@@ -371,14 +371,14 @@ Process-wide parameters .. versionadded:: 3.1.3

.. c:function:: void PySys_SetArgv(int argc, wchar_t **argv) This function works like :c:func:PySys_SetArgvEx with updatepath set

.. c:function:: int PyGILState_Check()

--- a/Doc/c-api/long.rst +++ b/Doc/c-api/long.rst @@ -232,7 +232,7 @@ All integers are implemented as "long" i method (if present) to convert it to a :c:type:PyLongObject. If the value of obj is out of range for an :c:type:unsigned long,

.. c:function:: unsigned PY_LONG_LONG PyLong_AsUnsignedLongLongMask(PyObject *obj) @@ -242,7 +242,7 @@ All integers are implemented as "long" i method (if present) to convert it to a :c:type:PyLongObject. If the value of obj is out of range for an :c:type:unsigned long long,

.. c:function:: double PyLong_AsDouble(PyObject *pylong)

--- a/Doc/c-api/number.rst +++ b/Doc/c-api/number.rst @@ -266,7 +266,7 @@ Number Protocol .. c:function:: Py_ssize_t PyNumber_AsSsize_t(PyObject *o, PyObject *exc) Returns o converted to a Py_ssize_t value if o can be interpreted as an

--- a/Doc/c-api/set.rst +++ b/Doc/c-api/set.rst @@ -114,7 +114,7 @@ or :class:frozenset or instances of th .. c:function:: int PySet_Contains(PyObject *anyset, PyObject *key)

.. c:function:: int PySet_Discard(PyObject *set, PyObject *key)

--- a/Doc/c-api/slice.rst +++ b/Doc/c-api/slice.rst @@ -32,9 +32,9 @@ Slice Objects assuming a sequence of length length. Treats indices greater than length as errors.

@@ -51,7 +51,7 @@ Slice Objects of bounds indices are clipped in a manner consistent with the handling of normal slices.

--- a/Doc/c-api/structures.rst +++ b/Doc/c-api/structures.rst @@ -290,7 +290,7 @@ definition with the same method name. handles use of the :keyword:del statement on that attribute more correctly than :c:macro:T_OBJECT.

--- a/Doc/c-api/typeobj.rst +++ b/Doc/c-api/typeobj.rst @@ -1278,7 +1278,7 @@ Buffer Object Structures steps: (1) Check if the request can be met. If not, raise :c:data:PyExc_BufferError,

(2) Fill in the requested fields. @@ -1286,7 +1286,7 @@ Buffer Object Structures (4) Set :c:data:view->obj to exporter and increment :c:data:view->obj.

--- a/Doc/c-api/unicode.rst +++ b/Doc/c-api/unicode.rst @@ -102,7 +102,7 @@ access internal read-only data of Unicod .. XXX expand on when it is not required

.. c:function:: int Py_UNICODE_ISSPACE(Py_UNICODE ch)

.. c:function:: int Py_UNICODE_ISLOWER(Py_UNICODE ch)

.. c:function:: int Py_UNICODE_ISUPPER(Py_UNICODE ch)

.. c:function:: int Py_UNICODE_ISTITLE(Py_UNICODE ch)

.. c:function:: int Py_UNICODE_ISLINEBREAK(Py_UNICODE ch)

.. c:function:: int Py_UNICODE_ISDECIMAL(Py_UNICODE ch)

.. c:function:: int Py_UNICODE_ISDIGIT(Py_UNICODE ch)

.. c:function:: int Py_UNICODE_ISNUMERIC(Py_UNICODE ch)

.. c:function:: int Py_UNICODE_ISALPHA(Py_UNICODE ch)

.. c:function:: int Py_UNICODE_ISALNUM(Py_UNICODE ch)

.. c:function:: int Py_UNICODE_ISPRINTABLE(Py_UNICODE ch)

@@ -913,7 +913,7 @@ wchar_t Support Copy the Unicode object contents into the :c:type:wchar_t buffer w. At most size :c:type:wchar_t characters are copied (excluding a possibly trailing null termination character). Return the number of :c:type:wchar_t characters

@@ -1591,16 +1591,16 @@ They all return NULL or -1 if an e .. c:function:: Py_ssize_t PyUnicode_Tailmatch(PyObject *str, PyObject *substr, [](#l12.109) Py_ssize_t start, Py_ssize_t end, int direction)

.. c:function:: Py_ssize_t PyUnicode_Find(PyObject *str, PyObject *substr, [](#l12.120) Py_ssize_t start, Py_ssize_t end, int direction) Return the first position of substr in str[start:end] using the given

Return the first position of the character ch in str[start:end] using

@@ -1629,19 +1629,19 @@ They all return NULL or -1 if an e PyObject *replstr, Py_ssize_t maxcount) Replace at most maxcount occurrences of substr in str with replstr and

.. c:function:: int PyUnicode_Compare(PyObject *left, PyObject *right)

.. c:function:: int PyUnicode_CompareWithASCIIString(PyObject *uni, const char *string)