0
0
mirror of https://github.com/python/cpython.git synced 2024-11-22 13:28:21 +01:00
cpython/Modules/_testcapi
Victor Stinner fc2cb86d21
gh-107073: Make PyObject_VisitManagedDict() public (#108763)
Make PyObject_VisitManagedDict() and PyObject_ClearManagedDict()
functions public in Python 3.13 C API.

* Rename _PyObject_VisitManagedDict() to PyObject_VisitManagedDict().
* Rename _PyObject_ClearManagedDict() to PyObject_ClearManagedDict().
* Document these functions.
2023-10-02 19:24:08 +02:00
..
clinic gh-104469: Convert _testcapi/vectorcall_limited.c to use AC (#109691) 2023-09-25 13:24:19 +02:00
abstract.c
buffer.c
code.c
datetime.c
dict.c
docstring.c
exceptions.c
float.c
gc.c
getargs.c
heaptype_relative.c
heaptype.c gh-107073: Make PyObject_VisitManagedDict() public (#108763) 2023-10-02 19:24:08 +02:00
immortal.c
long.c gh-109723: Disable Py_BUILD_CORE in _testcapi (#109727) 2023-09-22 14:54:37 +00:00
mem.c
parts.h gh-109723: Disable Py_BUILD_CORE in _testcapi (#109727) 2023-09-22 14:54:37 +00:00
pyatomic.c gh-109723: Disable Py_BUILD_CORE in _testcapi (#109727) 2023-09-22 14:54:37 +00:00
pyos.c
README.txt
structmember.c
testcapi_long.h
unicode.c
util.h
vectorcall_limited.c gh-104469: Convert _testcapi/vectorcall_limited.c to use AC (#109691) 2023-09-25 13:24:19 +02:00
vectorcall.c
watchers.c

Tests in this directory are compiled into the _testcapi extension.
The main file for the extension is Modules/_testcapimodule.c, which
calls `_PyTestCapi_Init_*` from these functions.

General guideline when writing test code for C API.
* Use Argument Clinic to minimise the amount of boilerplate code.
* Add a newline between the argument spec and the docstring.
* If a test description is needed, make sure the added docstring clearly and succinctly describes purpose of the function.
* DRY, use the clone feature of Argument Clinic.
* Try to avoid adding new interned strings; reuse existing parameter names if possible. Use the `as` feature of Argument Clinic to override the C variable name, if needed.