Skip to content

Commit 5ef94d5

Browse files
committed
Document PyLong_FromPid and PyLong_AsPid
1 parent bfe5481 commit 5ef94d5

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Doc/c-api/long.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,15 @@ 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 ID.
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+
164173
.. c:function:: long PyLong_AsLong(PyObject *obj)
165174
166175
.. index::
@@ -575,6 +584,15 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
575584
.. versionadded:: 3.13
576585
577586
587+
.. c:macro:: PyLong_AsPid(pid)
588+
589+
Macro for converting a Python integer into a process ID.
590+
591+
This can be defined as an alias to :c:func:`PyLong_AsLong`,
592+
:c:func:`PyLong_FromLongLong`, or :c:func:`PyLong_AsInt`, depending on the
593+
size of the system's PID type.
594+
595+
578596
.. c:function:: int PyLong_GetSign(PyObject *obj, int *sign)
579597
580598
Get the sign of the integer object *obj*.

0 commit comments

Comments
 (0)