Orbits  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
Classes | Macros | Typedefs | Functions | Variables
objimpl.h File Reference
#include "pymem.h"

Go to the source code of this file.

Classes

union  _gc_head
 

Macros

#define PyObject_MALLOC   PyObject_Malloc
 
#define PyObject_REALLOC   PyObject_Realloc
 
#define PyObject_FREE   PyObject_Free
 
#define PyObject_Del   PyObject_Free
 
#define PyObject_DEL   PyObject_FREE
 
#define _PyObject_Del   PyObject_Free
 
#define PyObject_New(type, typeobj)   ( (type *) _PyObject_New(typeobj) )
 
#define PyObject_NewVar(type, typeobj, n)   ( (type *) _PyObject_NewVar((typeobj), (n)) )
 
#define PyObject_INIT(op, typeobj)   ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) )
 
#define PyObject_INIT_VAR(op, typeobj, size)   ( Py_SIZE(op) = (size), PyObject_INIT((op), (typeobj)) )
 
#define _PyObject_SIZE(typeobj)   ( (typeobj)->tp_basicsize )
 
#define _PyObject_VAR_SIZE(typeobj, nitems)
 
#define PyObject_NEW(type, typeobj)
 
#define PyObject_NEW_VAR(type, typeobj, n)
 
#define PyType_IS_GC(t)   PyType_HasFeature((t), Py_TPFLAGS_HAVE_GC)
 
#define PyObject_IS_GC(o)
 
#define PyObject_GC_Resize(type, op, n)   ( (type *) _PyObject_GC_Resize((PyVarObject *)(op), (n)) )
 
#define _PyObject_GC_Del   PyObject_GC_Del
 
#define _Py_AS_GC(o)   ((PyGC_Head *)(o)-1)
 
#define _PyGC_REFS_UNTRACKED   (-2)
 
#define _PyGC_REFS_REACHABLE   (-3)
 
#define _PyGC_REFS_TENTATIVELY_UNREACHABLE   (-4)
 
#define _PyObject_GC_TRACK(o)
 
#define _PyObject_GC_UNTRACK(o)
 
#define _PyObject_GC_IS_TRACKED(o)   ((_Py_AS_GC(o))->gc.gc_refs != _PyGC_REFS_UNTRACKED)
 
#define _PyObject_GC_MAY_BE_TRACKED(obj)
 
#define PyObject_GC_New(type, typeobj)   ( (type *) _PyObject_GC_New(typeobj) )
 
#define PyObject_GC_NewVar(type, typeobj, n)   ( (type *) _PyObject_GC_NewVar((typeobj), (n)) )
 
#define Py_VISIT(op)
 
#define PyGC_HEAD_SIZE   0
 
#define PyObject_GC_Init(op)
 
#define PyObject_GC_Fini(op)
 
#define PyObject_AS_GC(op)   (op)
 
#define PyObject_FROM_GC(op)   (op)
 
#define PyType_SUPPORTS_WEAKREFS(t)
 
#define PyObject_GET_WEAKREFS_LISTPTR(o)   ((PyObject **) (((char *) (o)) + Py_TYPE(o)->tp_weaklistoffset))
 

Typedefs

typedef union _gc_head PyGC_Head
 

Functions

 PyAPI_FUNC (void *) PyObject_Malloc(size_t)
 
 PyAPI_FUNC (void) PyObject_Free(void *)
 
 PyAPI_FUNC (PyObject *) PyObject_Init(PyObject *
 
PyTypeObjectPyAPI_FUNC (PyVarObject *) PyObject_InitVar(PyVarObject *
 
 PyAPI_FUNC (Py_ssize_t) PyGC_Collect(void)
 

Variables

 size_t
 
PyTypeObject PyTypeObject Py_ssize_t
 
PyGC_Head_PyGC_generation0
 

Macro Definition Documentation

#define _Py_AS_GC (   o)    ((PyGC_Head *)(o)-1)
#define _PyGC_REFS_REACHABLE   (-3)
#define _PyGC_REFS_TENTATIVELY_UNREACHABLE   (-4)
#define _PyGC_REFS_UNTRACKED   (-2)
#define _PyObject_Del   PyObject_Free
#define _PyObject_GC_Del   PyObject_GC_Del
#define _PyObject_GC_IS_TRACKED (   o)    ((_Py_AS_GC(o))->gc.gc_refs != _PyGC_REFS_UNTRACKED)
#define _PyObject_GC_MAY_BE_TRACKED (   obj)
#define _PyObject_GC_TRACK (   o)
Value:
do { \
if (g->gc.gc_refs != _PyGC_REFS_UNTRACKED) \
Py_FatalError("GC object already tracked"); \
g->gc.gc_refs = _PyGC_REFS_REACHABLE; \
g->gc.gc_next = _PyGC_generation0; \
g->gc.gc_prev->gc.gc_next = g; \
_PyGC_generation0->gc.gc_prev = g; \
} while (0);
#define _PyObject_GC_UNTRACK (   o)
Value:
do { \
assert(g->gc.gc_refs != _PyGC_REFS_UNTRACKED); \
g->gc.gc_refs = _PyGC_REFS_UNTRACKED; \
g->gc.gc_prev->gc.gc_next = g->gc.gc_next; \
g->gc.gc_next->gc.gc_prev = g->gc.gc_prev; \
g->gc.gc_next = NULL; \
} while (0);
#define _PyObject_SIZE (   typeobj)    ( (typeobj)->tp_basicsize )
#define _PyObject_VAR_SIZE (   typeobj,
  nitems 
)
Value:
(size_t) \
( ( (typeobj)->tp_basicsize + \
(nitems)*(typeobj)->tp_itemsize + \
(SIZEOF_VOID_P - 1) \
) & ~(SIZEOF_VOID_P - 1) \
)
#define Py_VISIT (   op)
Value:
do { \
if (op) { \
int vret = visit((PyObject *)(op), arg); \
if (vret) \
return vret; \
} \
} while (0)
#define PyGC_HEAD_SIZE   0
#define PyObject_AS_GC (   op)    (op)
#define PyObject_Del   PyObject_Free
#define PyObject_DEL   PyObject_FREE
#define PyObject_FREE   PyObject_Free
#define PyObject_FROM_GC (   op)    (op)
#define PyObject_GC_Fini (   op)
#define PyObject_GC_Init (   op)
#define PyObject_GC_New (   type,
  typeobj 
)    ( (type *) _PyObject_GC_New(typeobj) )
#define PyObject_GC_NewVar (   type,
  typeobj,
  n 
)    ( (type *) _PyObject_GC_NewVar((typeobj), (n)) )
#define PyObject_GC_Resize (   type,
  op,
  n 
)    ( (type *) _PyObject_GC_Resize((PyVarObject *)(op), (n)) )
#define PyObject_GET_WEAKREFS_LISTPTR (   o)    ((PyObject **) (((char *) (o)) + Py_TYPE(o)->tp_weaklistoffset))
#define PyObject_INIT (   op,
  typeobj 
)    ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) )
#define PyObject_INIT_VAR (   op,
  typeobj,
  size 
)    ( Py_SIZE(op) = (size), PyObject_INIT((op), (typeobj)) )
#define PyObject_IS_GC (   o)
Value:
(Py_TYPE(o)->tp_is_gc == NULL || Py_TYPE(o)->tp_is_gc(o)))
#define PyObject_MALLOC   PyObject_Malloc
#define PyObject_New (   type,
  typeobj 
)    ( (type *) _PyObject_New(typeobj) )
#define PyObject_NEW (   type,
  typeobj 
)
Value:
( (type *) PyObject_Init( \
(PyObject *) PyObject_MALLOC( _PyObject_SIZE(typeobj) ), (typeobj)) )
#define PyObject_NEW_VAR (   type,
  typeobj,
  n 
)
Value:
( (type *) PyObject_InitVar( \
(typeobj), (n)) )
#define PyObject_NewVar (   type,
  typeobj,
  n 
)    ( (type *) _PyObject_NewVar((typeobj), (n)) )
#define PyObject_REALLOC   PyObject_Realloc
#define PyType_IS_GC (   t)    PyType_HasFeature((t), Py_TPFLAGS_HAVE_GC)
#define PyType_SUPPORTS_WEAKREFS (   t)
Value:
&& ((t)->tp_weaklistoffset > 0))

Typedef Documentation

typedef union _gc_head PyGC_Head

Function Documentation

PyAPI_FUNC ( void *  )
PyAPI_FUNC ( void  )
PyAPI_FUNC ( PyObject )
read
PyAPI_FUNC ( PyVarObject )
PyAPI_FUNC ( Py_ssize_t  )

Variable Documentation

PyGC_Head* _PyGC_generation0
size_t

Copyright 2014 Google Inc. All rights reserved.