Skip to content

Commit 23a578f

Browse files
PyException_HEAD
1 parent b2b68d4 commit 23a578f

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

Doc/c-api/exceptions.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,22 @@ Exception Objects
868868
869869
.. versionadded:: 3.12
870870
871+
.. c:macro:: PyException_HEAD
872+
873+
This is a macro used when declaring new exception types.
874+
The :c:macro:`!PyException_HEAD` macro expands to::
875+
876+
PyObject_HEAD
877+
PyObject *dict;
878+
PyObject *args;
879+
PyObject *notes;
880+
PyObject *traceback;
881+
PyObject *context;
882+
PyObject *cause;
883+
char suppress_context;
884+
885+
See :c:macro:`PyObject_HEAD` for the base object header.
886+
871887
.. _unicodeexceptions:
872888
873889
Unicode Exception Objects

Doc/c-api/structures.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ under :ref:`reference counting <countingrefs>`.
7979
.. c:macro:: PyObject_HEAD
8080
8181
This is a macro used when declaring new types which represent objects
82-
without a varying length. The PyObject_HEAD macro expands to::
82+
without a varying length. The :c:macro:`!PyObject_HEAD` macro expands to::
8383

8484
PyObject ob_base;
8585

@@ -90,7 +90,7 @@ under :ref:`reference counting <countingrefs>`.
9090
9191
This is a macro used when declaring new types which represent objects
9292
with a length that varies from instance to instance.
93-
The PyObject_VAR_HEAD macro expands to::
93+
The :c:macro:`!PyObject_VAR_HEAD` macro expands to::
9494

9595
PyVarObject ob_base;
9696

0 commit comments

Comments
 (0)