mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
gh-93502: Add new C-API functions to trace object creation and destruction (#115945)
This commit is contained in:
parent
2770d5caca
commit
6bcbee09df
10 changed files with 207 additions and 8 deletions
|
|
@ -510,3 +510,13 @@ PyAPI_FUNC(int) PyType_Unwatch(int watcher_id, PyObject *type);
|
|||
* assigned, or 0 if a new tag could not be assigned.
|
||||
*/
|
||||
PyAPI_FUNC(int) PyUnstable_Type_AssignVersionTag(PyTypeObject *type);
|
||||
|
||||
|
||||
typedef enum {
|
||||
PyRefTracer_CREATE = 0,
|
||||
PyRefTracer_DESTROY = 1,
|
||||
} PyRefTracerEvent;
|
||||
|
||||
typedef int (*PyRefTracer)(PyObject *, PyRefTracerEvent event, void *);
|
||||
PyAPI_FUNC(int) PyRefTracer_SetTracer(PyRefTracer tracer, void *data);
|
||||
PyAPI_FUNC(PyRefTracer) PyRefTracer_GetTracer(void**);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue