[Python-checkins] CVS: python/dist/src/Include objimpl.h,2.19,2.20
Guido van Rossum
python-dev@python.org
Fri, 30 Jun 2000 18:00:38 -0700
- Previous message: [Python-checkins] CVS: python/dist/src/Modules mmapmodule.c,2.15,2.16
- Next message: [Python-checkins] CVS: python/dist/src/Objects classobject.c,2.96,2.97 dictobject.c,2.57,2.58 funcobject.c,2.27,2.28 listobject.c,2.78,2.79 object.c,2.78,2.79 tupleobject.c,2.41,2.42
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Include
In directory slayer.i.sourceforge.net:/tmp/cvs-serv19078
Modified Files:
objimpl.h
Log Message:
Neil Schemenauer: small fixes for GC
Index: objimpl.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/objimpl.h,v
retrieving revision 2.19
retrieving revision 2.20
diff -C2 -r2.19 -r2.20
*** objimpl.h 2000/06/30 23:58:04 2.19
--- objimpl.h 2000/07/01 01:00:35 2.20
***************
*** 184,187 ****
--- 184,189 ----
(typeobj), (n)) )
+ #define PyObject_DEL(op) PyObject_FREE(op)
+
/* This example code implements an object constructor with a custom
allocator, where PyObject_New is inlined, and shows the important
***************
*** 222,226 ****
Py_TPFLAGS_GC and define the type method tp_recurse. You should also
add the method tp_clear if your object is mutable. Include
! PyGC_INFO_SIZE in the calculation of tp_basicsize. Call
PyObject_GC_Init after the pointers followed by tp_recurse become
valid (usually just before returning the object from the allocation
--- 224,228 ----
Py_TPFLAGS_GC and define the type method tp_recurse. You should also
add the method tp_clear if your object is mutable. Include
! PyGC_HEAD_SIZE in the calculation of tp_basicsize. Call
PyObject_GC_Init after the pointers followed by tp_recurse become
valid (usually just before returning the object from the allocation
***************
*** 235,239 ****
#define PyObject_AS_GC(op) (op)
#define PyObject_FROM_GC(op) (op)
- #define PyObject_DEL(op) PyObject_FREE(op)
#else
--- 237,240 ----
***************
*** 268,275 ****
/* Get the object given the PyGC_Head */
#define PyObject_FROM_GC(g) ((PyObject *)(((PyGC_Head *)g)+1))
-
- #define PyObject_DEL(op) PyObject_FREE( PyObject_IS_GC(op) ? \
- (ANY *)PyObject_AS_GC(op) : \
- (ANY *)(op) )
#endif /* WITH_CYCLE_GC */
--- 269,272 ----
- Previous message: [Python-checkins] CVS: python/dist/src/Modules mmapmodule.c,2.15,2.16
- Next message: [Python-checkins] CVS: python/dist/src/Objects classobject.c,2.96,2.97 dictobject.c,2.57,2.58 funcobject.c,2.27,2.28 listobject.c,2.78,2.79 object.c,2.78,2.79 tupleobject.c,2.41,2.42
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]