diff options
Diffstat (limited to 'Include/objimpl.h')
-rw-r--r-- | Include/objimpl.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Include/objimpl.h b/Include/objimpl.h index 65b6d91c36..c0ed9b7077 100644 --- a/Include/objimpl.h +++ b/Include/objimpl.h @@ -99,8 +99,10 @@ PyAPI_FUNC(void *) PyObject_Calloc(size_t nelem, size_t elsize); PyAPI_FUNC(void *) PyObject_Realloc(void *ptr, size_t new_size); PyAPI_FUNC(void) PyObject_Free(void *ptr); +#ifndef Py_LIMITED_API /* This function returns the number of allocated memory blocks, regardless of size */ PyAPI_FUNC(Py_ssize_t) _Py_GetAllocatedBlocks(void); +#endif /* !Py_LIMITED_API */ /* Macros */ #ifdef WITH_PYMALLOC @@ -224,11 +226,12 @@ PyAPI_FUNC(void) PyObject_SetArenaAllocator(PyObjectArenaAllocator *allocator); * ========================== */ -/* C equivalent of gc.collect(). */ +/* C equivalent of gc.collect() which ignores the state of gc.enabled. */ PyAPI_FUNC(Py_ssize_t) PyGC_Collect(void); #ifndef Py_LIMITED_API PyAPI_FUNC(Py_ssize_t) _PyGC_CollectNoFail(void); +PyAPI_FUNC(Py_ssize_t) _PyGC_CollectIfEnabled(void); #endif /* Test if a type has a GC head */ @@ -322,8 +325,10 @@ extern PyGC_Head *_PyGC_generation0; (!PyTuple_CheckExact(obj) || _PyObject_GC_IS_TRACKED(obj))) #endif /* Py_LIMITED_API */ +#ifndef Py_LIMITED_API PyAPI_FUNC(PyObject *) _PyObject_GC_Malloc(size_t size); PyAPI_FUNC(PyObject *) _PyObject_GC_Calloc(size_t size); +#endif /* !Py_LIMITED_API */ PyAPI_FUNC(PyObject *) _PyObject_GC_New(PyTypeObject *); PyAPI_FUNC(PyVarObject *) _PyObject_GC_NewVar(PyTypeObject *, Py_ssize_t); PyAPI_FUNC(void) PyObject_GC_Track(void *); |