[Python-checkins] CVS: python/dist/src/Include object.h,2.54,2.55

Jeremy Hylton python-dev@python.org
2000年6月23日 07:18:13 -0700


Update of /cvsroot/python/python/dist/src/Include
In directory slayer.i.sourceforge.net:/tmp/cvs-serv2798/Include
Modified Files:
	object.h 
Log Message:
Round 1 of Neil Schemenauer's GC patches:
This patch adds the type methods traverse and clear necessary for GC
implementation.
Index: object.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/object.h,v
retrieving revision 2.54
retrieving revision 2.55
diff -C2 -r2.54 -r2.55
*** object.h	2000年04月24日 15:40:45	2.54
--- object.h	2000年06月23日 14:18:10	2.55
***************
*** 146,149 ****
--- 146,151 ----
 typedef int (*getcharbufferproc) Py_PROTO((PyObject *, int, const char **));
 typedef int (*objobjproc) Py_PROTO((PyObject *, PyObject *));
+ typedef int (*visitproc) Py_PROTO((PyObject *, void *));
+ typedef int (*traverseproc) Py_PROTO((PyObject *, visitproc, void *));
 
 typedef struct {
***************
*** 244,250 ****
 	char *tp_doc; /* Documentation string */
 
 	/* More spares */
- 	long tp_xxx5;
- 	long tp_xxx6;
 	long tp_xxx7;
 	long tp_xxx8;
--- 246,256 ----
 	char *tp_doc; /* Documentation string */
 
+ 	/* call function for all accessible objects */
+ 	traverseproc tp_traverse;
+ 	
+ 	/* delete references to contained objects */
+ 	inquiry tp_clear;
+ 
 	/* More spares */
 	long tp_xxx7;
 	long tp_xxx8;

AltStyle によって変換されたページ (->オリジナル) /