File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -806,7 +806,7 @@ extern _invalid_parameter_handler _Py_silent_invalid_parameter_handler;
806806 *
807807 * Py_NEWCAPI_BORROWED_REF: declare functions/macros using
808808 * borrowed references -- enabled by Py_NEWCAPI_NO_MACRO
809- * and Py_NEWCAPI_NO_STRUCT.
809+ * and Py_NEWCAPI_NO_STRUCT, but not by Py_NEWCAPI .
810810 */
811811
812812#if defined(Py_NEWCAPI )
Original file line number Diff line number Diff line change @@ -20,7 +20,25 @@ Build and run unit tests::
2020
2121If you want to help, look at ``TODO.rst ``.
2222
23- The changes live in the **pythoncapi ** branch. See also:
23+ The changes live in the **pythoncapi ** branch.
24+
25+ New C API defines:
26+
27+ * ``Py_NEWCAPI_NO_MACRO ``: replace macros with function calls
28+ ``PyTuple_GET_SIZE() `` becomes ``PyTuple_Size() ``
29+ * ``Py_NEWCAPI_NO_STRUCT ``: must not use ``PyObject.ob_refcnt `` or any other
30+ field of Python object structures; structures should hide their fields:
31+ compilation error.
32+ * ``Py_NEWCAPI ``: new C API without borrowed references, without macro,
33+ without struct
34+
35+ Related defines:
36+
37+ * ``Py_NEWCAPI_BORROWED_REF ``: declare functions/macros using
38+ borrowed references -- enabled by ``Py_NEWCAPI_NO_MACRO ``
39+ and ``Py_NEWCAPI_NO_STRUCT ``, but not by ``Py_NEWCAPI ``.
40+
41+ See also:
2442
2543* `github.com/pythoncapi/cpython <https://github.com/pythoncapi/cpython >`_
2644* `capi-sig mailing list
You can’t perform that action at this time.
0 commit comments