Skip to content

Commit b941cc9

Browse files
Deploy preview for PR 1153 🛫
1 parent 65dcd9d commit b941cc9

File tree

585 files changed

+1885
-804
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

585 files changed

+1885
-804
lines changed

pr-preview/pr-1153/_sources/c-api/codec.rst.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,13 @@ Registry API for Unicode encoding error handlers
129129
Replace the unicode encode error with ``\N{...}`` escapes.
130130
131131
.. versionadded:: 3.5
132+
133+
134+
Codec utility variables
135+
-----------------------
136+
137+
.. c:var:: const char *Py_hexdigits
138+
139+
A string constant containing the lowercase hexadecimal digits: ``"0123456789abcdef"``.
140+
141+
.. versionadded:: 3.3

pr-preview/pr-1153/_sources/c-api/exceptions.rst.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -979,6 +979,27 @@ these are the C equivalent to :func:`reprlib.recursive_repr`.
979979
Ends a :c:func:`Py_ReprEnter`. Must be called once for each
980980
invocation of :c:func:`Py_ReprEnter` that returns zero.
981981
982+
.. c:function:: int Py_GetRecursionLimit(void)
983+
984+
Get the recursion limit for the current interpreter. It can be set with
985+
:c:func:`Py_SetRecursionLimit`. The recursion limit prevents the
986+
Python interpreter stack from growing infinitely.
987+
988+
This function cannot fail, and the caller must hold an
989+
:term:`attached thread state`.
990+
991+
.. seealso::
992+
:py:func:`sys.getrecursionlimit`
993+
994+
.. c:function:: void Py_SetRecursionLimit(int new_limit)
995+
996+
Set the recursion limit for the current interpreter.
997+
998+
This function cannot fail, and the caller must hold an
999+
:term:`attached thread state`.
1000+
1001+
.. seealso::
1002+
:py:func:`sys.setrecursionlimit`
9821003
9831004
.. _standardexceptions:
9841005

pr-preview/pr-1153/_sources/c-api/iterator.rst.txt

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,45 @@ sentinel value is returned.
5252
*sentinel*, the iteration will be terminated.
5353
5454
55+
Range Objects
56+
^^^^^^^^^^^^^
57+
58+
.. c:var:: PyTypeObject PyRange_Type
59+
60+
The type object for :class:`range` objects.
61+
62+
63+
.. c:function:: int PyRange_Check(PyObject *o)
64+
65+
Return true if the object *o* is an instance of a :class:`range` object.
66+
This function always succeeds.
67+
68+
69+
Builtin Iterator Types
70+
^^^^^^^^^^^^^^^^^^^^^^
71+
72+
These are built-in iteration types that are included in Python's C API, but
73+
provide no additional functions. They are here for completeness.
74+
75+
76+
.. list-table::
77+
:widths: auto
78+
:header-rows: 1
79+
80+
* * C type
81+
* Python type
82+
* * .. c:var:: PyTypeObject PyEnum_Type
83+
* :py:class:`enumerate`
84+
* * .. c:var:: PyTypeObject PyFilter_Type
85+
* :py:class:`filter`
86+
* * .. c:var:: PyTypeObject PyMap_Type
87+
* :py:class:`map`
88+
* * .. c:var:: PyTypeObject PyReversed_Type
89+
* :py:class:`reversed`
90+
* * .. c:var:: PyTypeObject PyZip_Type
91+
* :py:class:`zip`
92+
93+
5594
Other Iterator Objects
5695
^^^^^^^^^^^^^^^^^^^^^^
5796

pr-preview/pr-1153/_sources/c-api/long.rst.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,17 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
161161
.. versionadded:: 3.13
162162
163163
164+
.. c:macro:: PyLong_FromPid(pid)
165+
166+
Macro for creating a Python integer from a process identifier.
167+
168+
This can be defined as an alias to :c:func:`PyLong_FromLong` or
169+
:c:func:`PyLong_FromLongLong`, depending on the size of the system's
170+
PID type.
171+
172+
.. versionadded:: 3.2
173+
174+
164175
.. c:function:: long PyLong_AsLong(PyObject *obj)
165176
166177
.. index::
@@ -575,6 +586,17 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
575586
.. versionadded:: 3.13
576587
577588
589+
.. c:macro:: PyLong_AsPid(pid)
590+
591+
Macro for converting a Python integer into a process identifier.
592+
593+
This can be defined as an alias to :c:func:`PyLong_AsLong`,
594+
:c:func:`PyLong_FromLongLong`, or :c:func:`PyLong_AsInt`, depending on the
595+
size of the system's PID type.
596+
597+
.. versionadded:: 3.2
598+
599+
578600
.. c:function:: int PyLong_GetSign(PyObject *obj, int *sign)
579601
580602
Get the sign of the integer object *obj*.

0 commit comments

Comments
 (0)