Skip to content

gh-135755: Docs: C API: Document missing PyFunction_GET* macros #135762

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jun 25, 2025
Merged
14 changes: 7 additions & 7 deletions Doc/c-api/function.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ There are a few functions specific to Python functions.

.. c:function:: PyObject *PyFunction_GET_CODE(PyObject *op)

Equivalent to :c:func:`PyFunction_GetCode`, but without error checking.
Similar to :c:func:`PyFunction_GetCode`, but without error checking.


.. c:function:: PyObject* PyFunction_GetGlobals(PyObject *op)
Expand All @@ -69,7 +69,7 @@ There are a few functions specific to Python functions.

.. c:function:: PyObject *PyFunction_GET_GLOBALS(PyObject *op)

Equivalent to :c:func:`PyFunction_GetGlobals`, but without error checking.
Similar to :c:func:`PyFunction_GetGlobals`, but without error checking.


.. c:function:: PyObject* PyFunction_GetModule(PyObject *op)
Expand All @@ -84,7 +84,7 @@ There are a few functions specific to Python functions.

.. c:function:: PyObject *PyFunction_GET_MODULE(PyObject *op)

Equivalent to :c:func:`PyFunction_GetModule`, but without error checking.
Similar to :c:func:`PyFunction_GetModule`, but without error checking.


.. c:function:: PyObject* PyFunction_GetDefaults(PyObject *op)
Expand All @@ -95,7 +95,7 @@ There are a few functions specific to Python functions.

.. c:function:: PyObject *PyFunction_GET_DEFAULTS(PyObject *op)

Equivalent to :c:func:`PyFunction_GetDefaults`, but without error checking.
Similar to :c:func:`PyFunction_GetDefaults`, but without error checking.


.. c:function:: int PyFunction_SetDefaults(PyObject *op, PyObject *defaults)
Expand Down Expand Up @@ -126,7 +126,7 @@ There are a few functions specific to Python functions.

.. c:function:: PyObject *PyFunction_GET_KW_DEFAULTS(PyObject *op)

Equivalent to :c:func:`PyFunction_GetKwDefaults`, but without error checking.
Similar to :c:func:`PyFunction_GetKwDefaults`, but without error checking.

.. versionadded:: 3.0

Expand All @@ -139,7 +139,7 @@ There are a few functions specific to Python functions.

.. c:function:: PyObject *PyFunction_GET_CLOSURE(PyObject *op)

Equivalent to :c:func:`PyFunction_GetClosure`, but without error checking.
Similar to :c:func:`PyFunction_GetClosure`, but without error checking.


.. c:function:: int PyFunction_SetClosure(PyObject *op, PyObject *closure)
Expand All @@ -160,7 +160,7 @@ There are a few functions specific to Python functions.

.. c:function:: PyObject *PyFunction_GET_ANNOTATIONS(PyObject *op)

Equivalent to :c:func:`PyFunction_GetAnnotations`, but without error checking.
Similar to :c:func:`PyFunction_GetAnnotations`, but without error checking.

.. versionadded:: 3.0

Expand Down
Loading