mirror of
https://github.com/python/cpython.git
synced 2025-10-14 18:59:46 +00:00
gh-123619: Add an unstable C API function for enabling deferred reference counting (GH-123635)
Co-authored-by: Sam Gross <colesbury@gmail.com>
This commit is contained in:
parent
29b5323c45
commit
d00878b06a
8 changed files with 128 additions and 1 deletions
|
@ -527,3 +527,10 @@ typedef enum {
|
|||
typedef int (*PyRefTracer)(PyObject *, PyRefTracerEvent event, void *);
|
||||
PyAPI_FUNC(int) PyRefTracer_SetTracer(PyRefTracer tracer, void *data);
|
||||
PyAPI_FUNC(PyRefTracer) PyRefTracer_GetTracer(void**);
|
||||
|
||||
/* Enable PEP-703 deferred reference counting on the object.
|
||||
*
|
||||
* Returns 1 if deferred reference counting was successfully enabled, and
|
||||
* 0 if the runtime ignored it. This function cannot fail.
|
||||
*/
|
||||
PyAPI_FUNC(int) PyUnstable_Object_EnableDeferredRefcount(PyObject *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue