[Zodb-checkins] CVS: Zope3/lib/python/Persistence/BTrees - BucketTemplate.c:1.1.2.4
Jeremy Hylton
jeremy@zope.com
Wed, 27 Feb 2002 17:34:52 -0500
Update of /cvs-repository/Zope3/lib/python/Persistence/BTrees
In directory cvs.zope.org:/tmp/cvs-serv18634
Modified Files:
Tag: Zope-3x-branch
BucketTemplate.c
Log Message:
Add missing DECREF on items on successful branch.
Fixes bogus conversion from ASSIGN() macro.
=== Zope3/lib/python/Persistence/BTrees/BucketTemplate.c 1.1.2.3 => 1.1.2.4 ===
else
state = Py_BuildValue("(O)", items);
+ Py_DECREF(items);
PER_ALLOW_DEACTIVATION(self);
PER_ACCESSED(self);
@@ -1117,8 +1118,6 @@
"clear() -- Remove all of the items from the bucket"},
{"update", (PyCFunction) Mapping_update, METH_VARARGS,
"update(collection) -- Add the items from the given collection"},
- {"ateudp", (PyCFunction) Mapping_update, METH_VARARGS,
- "update(collection) -- Add the items from the given collection"},
{"maxKey", (PyCFunction) Bucket_maxKey, METH_VARARGS,
"maxKey([key]) -- Fine the maximum key\n\n"
"If an argument is given, find the maximum <= the argument"},
@@ -1255,7 +1254,7 @@
static PyTypeObject BucketType = {
PyObject_HEAD_INIT(NULL) /* PyPersist_Type */
0, /* ob_size */
- MOD_NAME_PREFIX "Bucket", /* tp_name */
+ MODULE_NAME MOD_NAME_PREFIX "Bucket",
sizeof(Bucket), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)bucket_dealloc, /* tp_dealloc */
@@ -1273,8 +1272,7 @@
0, /* tp_getattro */
0, /* tp_setattro */
0, /* tp_as_buffer */
-/* XXX need to define traverse and clear functions */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HEAPTYPE |
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
Py_TPFLAGS_BASETYPE, /* tp_flags */
0, /* tp_doc */
(traverseproc)bucket_traverse, /* tp_traverse */