gh-107298: Fix some references in the C API documentation (GH-108072)

This commit is contained in:
Serhiy Storchaka 2023-08-17 11:16:00 +03:00 committed by GitHub
parent 1344cfac43
commit f51f0466c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 20 additions and 20 deletions

View file

@ -242,7 +242,7 @@ needed to ensure that it will not be discarded, causing :c:data:`!SpamError` to
become a dangling pointer. Should it become a dangling pointer, C code which
raises the exception could cause a core dump or other unintended side effects.
We discuss the use of ``PyMODINIT_FUNC`` as a function return type later in this
We discuss the use of :c:macro:`PyMODINIT_FUNC` as a function return type later in this
sample.
The :exc:`!spam.error` exception can be raised in your extension module using a
@ -363,7 +363,7 @@ only non-\ ``static`` item defined in the module file::
return PyModule_Create(&spammodule);
}
Note that PyMODINIT_FUNC declares the function as ``PyObject *`` return type,
Note that :c:macro:`PyMODINIT_FUNC` declares the function as ``PyObject *`` return type,
declares any special linkage declarations required by the platform, and for C++
declares the function as ``extern "C"``.