deimos.python.objimpl

Mirror objimpl.h

Members

Functions

PyGC_Collect
C_long PyGC_Collect()

C equivalent of gc.collect().

PyObject_Free
void PyObject_Free(void*)

_

PyObject_GC_Del
void PyObject_GC_Del(void*)

_

PyObject_GC_New
type* PyObject_GC_New(PyTypeObject* o)

_

PyObject_GC_NewVar
type* PyObject_GC_NewVar(PyTypeObject* o, Py_ssize_t n)

_

PyObject_GC_Resize
type* PyObject_GC_Resize(PyVarObject* op, Py_ssize_t n)

_

PyObject_GC_Track
void PyObject_GC_Track(void*)

_

PyObject_GC_UnTrack
void PyObject_GC_UnTrack(void*)

_

PyObject_GET_WEAKREFS_LISTPTR
auto PyObject_GET_WEAKREFS_LISTPTR(T o)

_

PyObject_IS_GC
int PyObject_IS_GC(PyObject* o)

Test if an object has a GC head

PyObject_Init
PyObject_BorrowedRef* PyObject_Init(PyObject*, PyTypeObject*)
PyObject_InitVar
Borrowed!PyVarObject* PyObject_InitVar(PyVarObject*, PyTypeObject*, Py_ssize_t)

Don't allocate memory. Instead of a 'type' parameter, take a pointer to a new object (allocated by an arbitrary allocator), and initialize its object header fields.

PyObject_Malloc
void* PyObject_Malloc(size_t)

_

PyObject_New
type* PyObject_New(PyTypeObject* o)

Allocates memory for a new object of the given type, and initializes part of it. 'type' must be the C structure type used to represent the object, and 'typeobj' the address of the corresponding type object. Reference count and type pointer are filled in; the rest of the bytes of the object are *undefined*! The resulting expression type is 'type *'. The size of the object is determined by the tp_basicsize field of the type object.

PyObject_NewVar
type* PyObject_NewVar(PyTypeObject* o, Py_ssize_t n)

PyObject_NewVar(type, typeobj, n) is similar but allocates a variable-size object with room for n items. In addition to the refcount and type pointer fields, this also fills in the ob_size field.

PyObject_Realloc
void* PyObject_Realloc(void*, size_t)

_

PyType_IS_GC
int PyType_IS_GC(PyTypeObject* t)

Test if a type has a GC head

PyType_SUPPORTS_WEAKREFS
auto PyType_SUPPORTS_WEAKREFS(PyObject* t)

Test if a type supports weak references

_PyObject_GC_Malloc
PyObject* _PyObject_GC_Malloc(size_t)

_

_PyObject_GC_New
PyObject* _PyObject_GC_New(PyTypeObject*)

_

_PyObject_GC_NewVar
PyVarObject* _PyObject_GC_NewVar(PyTypeObject*, Py_ssize_t)

_

_PyObject_GC_Resize
PyVarObject* _PyObject_GC_Resize(PyVarObject*, Py_ssize_t)

_

_PyObject_New
PyObject* _PyObject_New(PyTypeObject*)

_

_PyObject_NewVar
PyVarObject* _PyObject_NewVar(PyTypeObject*, Py_ssize_t)

_

Unions

PyGC_Head
union PyGC_Head

GC information is stored BEFORE the object structure.

Meta