Commit 697dd574 authored by Barry Warsaw's avatar Barry Warsaw

INITMODULE(): Be sure to decref the $Revision$ string added to the

module dictionary under the "__version__" key.  Plugs a small memory
leak caught by Insure.
parent 5f03f920
......@@ -341,7 +341,7 @@ static char BTree_module_documentation[] =
"\n"
MASTER_ID
BTREEITEMSTEMPLATE_C
"$Id: BTreeModuleTemplate.c,v 1.13 2001/06/20 19:32:55 matt Exp $\n"
"$Id: BTreeModuleTemplate.c,v 1.14 2001/11/08 16:52:01 bwarsaw Exp $\n"
BTREETEMPLATE_C
BUCKETTEMPLATE_C
KEYMACROS_H
......@@ -356,7 +356,7 @@ BTREEITEMSTEMPLATE_C
void
INITMODULE (void)
{
PyObject *m, *d, *c;
PyObject *m, *d, *c, *s;
UNLESS (sort_str=PyString_FromString("sort")) return;
UNLESS (reverse_str=PyString_FromString("reverse")) return;
......@@ -426,8 +426,9 @@ INITMODULE (void)
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
PyDict_SetItemString(d, "__version__",
PyString_FromString("$Revision: 1.13 $"));
s = PyString_FromString("$Revision: 1.14 $");
PyDict_SetItemString(d, "__version__", s);
Py_XDECREF(s);
PyExtensionClass_Export(d,MOD_NAME_PREFIX "Bucket", BucketType);
PyExtensionClass_Export(d,MOD_NAME_PREFIX "BTree", BTreeType);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment