[Python-checkins] CVS: python/dist/src/Python bltinmodule.c,2.198.2.7,2.198.2.8 ceval.c,2.241.2.7,2.241.2.8
Tim Peters
tim_one@users.sourceforge.net
Sat, 14 Jul 2001 00:47:37 -0700
- Previous message: [Python-checkins] CVS: python/dist/src/Objects frameobject.c,2.49.4.5,2.49.4.6 intobject.c,2.56.6.6,2.56.6.7 iterobject.c,1.3.2.3,1.3.2.4 listobject.c,2.92.6.10,2.92.6.11 longobject.c,1.71.6.4,1.71.6.5 methodobject.c,2.33.8.5,2.33.8.6 rangeobject.c,2.24.6.4,2.24.6.5
- Next message: [Python-checkins] CVS: python/dist/src/Objects longobject.c,1.85,1.86
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv29618/descr/dist/src/Python
Modified Files:
Tag: descr-branch
bltinmodule.c ceval.c
Log Message:
Merge of trunk tag date2001-07-13 into descr-branch. See PLAN.txt.
Index: bltinmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v
retrieving revision 2.198.2.7
retrieving revision 2.198.2.8
diff -C2 -r2.198.2.7 -r2.198.2.8
*** bltinmodule.c 2001/07/07 22:55:30 2.198.2.7
--- bltinmodule.c 2001/07/14 07:47:35 2.198.2.8
***************
*** 1392,1396 ****
return NULL;
}
! return PyRange_New(ilow, n, istep);
}
--- 1392,1396 ----
return NULL;
}
! return PyRange_New(ilow, n, istep, 1);
}
Index: ceval.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v
retrieving revision 2.241.2.7
retrieving revision 2.241.2.8
diff -C2 -r2.241.2.7 -r2.241.2.8
*** ceval.c 2001/07/08 11:51:54 2.241.2.7
--- ceval.c 2001/07/14 07:47:35 2.241.2.8
***************
*** 113,124 ****
gen->gi_frame = f;
gen->gi_running = 0;
return (PyObject *)gen;
}
static void
gen_dealloc(genobject *gen)
{
Py_DECREF(gen->gi_frame);
! PyObject_DEL(gen);
}
--- 113,132 ----
gen->gi_frame = f;
gen->gi_running = 0;
+ PyObject_GC_Init(gen);
return (PyObject *)gen;
}
+ static int
+ gen_traverse(genobject *gen, visitproc visit, void *arg)
+ {
+ return visit((PyObject *)gen->gi_frame, arg);
+ }
+
static void
gen_dealloc(genobject *gen)
{
+ PyObject_GC_Fini(gen);
Py_DECREF(gen->gi_frame);
! PyObject_Del(gen);
}
***************
*** 203,211 ****
statichere PyTypeObject gentype = {
PyObject_HEAD_INIT(&PyType_Type)
! 0, /* Number of items for varobject */
! "generator", /* Name of this type */
! sizeof(genobject), /* Basic object size */
! 0, /* Item size for varobject */
! (destructor)gen_dealloc, /* tp_dealloc */
0, /* tp_print */
0, /* tp_getattr */
--- 211,220 ----
statichere PyTypeObject gentype = {
PyObject_HEAD_INIT(&PyType_Type)
! 0, /* ob_size */
! "generator", /* tp_name */
! sizeof(genobject) + PyGC_HEAD_SIZE, /* tp_basicsize */
! 0, /* tp_itemsize */
! /* methods */
! (destructor)gen_dealloc, /* tp_dealloc */
0, /* tp_print */
0, /* tp_getattr */
***************
*** 222,229 ****
0, /* tp_setattro */
0, /* tp_as_buffer */
! Py_TPFLAGS_DEFAULT, /* tp_flags */
! 0, /* tp_doc */
! 0, /* tp_traverse */
! 0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
--- 231,238 ----
0, /* tp_setattro */
0, /* tp_as_buffer */
! Py_TPFLAGS_DEFAULT | Py_TPFLAGS_GC, /* tp_flags */
! 0, /* tp_doc */
! (traverseproc)gen_traverse, /* tp_traverse */
! 0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
- Previous message: [Python-checkins] CVS: python/dist/src/Objects frameobject.c,2.49.4.5,2.49.4.6 intobject.c,2.56.6.6,2.56.6.7 iterobject.c,1.3.2.3,1.3.2.4 listobject.c,2.92.6.10,2.92.6.11 longobject.c,1.71.6.4,1.71.6.5 methodobject.c,2.33.8.5,2.33.8.6 rangeobject.c,2.24.6.4,2.24.6.5
- Next message: [Python-checkins] CVS: python/dist/src/Objects longobject.c,1.85,1.86
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]