Commit 831a7f32 authored by 's avatar

merged fix (change PREFIX macro to MOD_NAME_PREFIX)

parent 2a1ae51f
......@@ -452,7 +452,7 @@ static PyNumberMethods BTreeItems_as_number_for_nonzero = {
static PyTypeObject BTreeItemsType = {
PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
PREFIX "BTreeItems", /*tp_name*/
MOD_NAME_PREFIX "BTreeItems", /*tp_name*/
sizeof(BTreeItems), /*tp_basicsize*/
0, /*tp_itemsize*/
/* methods */
......
......@@ -85,7 +85,7 @@
static char BTree_module_documentation[] =
""
"\n$Id: BTreeModuleTemplate.c,v 1.5 2001/03/15 13:16:22 jim Exp $"
"\n$Id: BTreeModuleTemplate.c,v 1.6 2001/03/15 17:33:07 brian Exp $"
;
#ifdef PERSISTENT
......@@ -379,7 +379,7 @@ INITMODULE ()
#endif
/* Create the module and add the functions */
m = Py_InitModule4(PREFIX "BTree", module_methods,
m = Py_InitModule4(MOD_NAME_PREFIX "BTree", module_methods,
BTree_module_documentation,
(PyObject*)NULL,PYTHON_API_VERSION);
......@@ -387,14 +387,14 @@ INITMODULE ()
d = PyModule_GetDict(m);
PyDict_SetItemString(d, "__version__",
PyString_FromString("$Revision: 1.5 $"));
PyString_FromString("$Revision: 1.6 $"));
PyExtensionClass_Export(d,PREFIX "Bucket", BucketType);
PyExtensionClass_Export(d,PREFIX "BTree", BTreeType);
PyExtensionClass_Export(d,PREFIX "Set", SetType);
PyExtensionClass_Export(d,PREFIX "TreeSet", TreeSetType);
PyExtensionClass_Export(d,MOD_NAME_PREFIX "Bucket", BucketType);
PyExtensionClass_Export(d,MOD_NAME_PREFIX "BTree", BTreeType);
PyExtensionClass_Export(d,MOD_NAME_PREFIX "Set", SetType);
PyExtensionClass_Export(d,MOD_NAME_PREFIX "TreeSet", TreeSetType);
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module " PREFIX "BTree");
Py_FatalError("can't initialize module " MOD_NAME_PREFIX "BTree");
}
......@@ -1304,7 +1304,7 @@ static PyNumberMethods BTree_as_number_for_nonzero = {
static PyExtensionClass BTreeType = {
PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
PREFIX "BTree", /*tp_name*/
MOD_NAME_PREFIX "BTree", /*tp_name*/
sizeof(BTree), /*tp_basicsize*/
0, /*tp_itemsize*/
/************* methods ********************/
......
......@@ -1175,7 +1175,7 @@ bucket_repr(Bucket *self)
static PyObject *format;
PyObject *r, *t;
UNLESS (format) UNLESS (format=PyString_FromString(PREFIX "Bucket(%s)"))
UNLESS (format) UNLESS (format=PyString_FromString(MOD_NAME_PREFIX "Bucket(%s)"))
return NULL;
UNLESS (t=PyTuple_New(1)) return NULL;
UNLESS (r=bucket_items(self,NULL)) goto err;
......@@ -1191,7 +1191,7 @@ err:
static PyExtensionClass BucketType = {
PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
PREFIX "Bucket", /*tp_name*/
MOD_NAME_PREFIX "Bucket", /*tp_name*/
sizeof(Bucket), /*tp_basicsize*/
0, /*tp_itemsize*/
/*********** methods ***********************/
......
......@@ -2,7 +2,7 @@
#define PERSISTENT
#define PREFIX "II"
#define MOD_NAME_PREFIX "II"
#define INITMODULE initIIBTree
#define DEFAULT_MAX_BUCKET_SIZE 120
#define DEFAULT_MAX_BTREE_SIZE 500
......
#define PERSISTENT
#define PREFIX "IO"
#define MOD_NAME_PREFIX "IO"
#define DEFAULT_MAX_BUCKET_SIZE 60
#define DEFAULT_MAX_BTREE_SIZE 500
#define INITMODULE initIOBTree
......
#define PERSISTENT
#define PREFIX "OI"
#define MOD_NAME_PREFIX "OI"
#define INITMODULE initOIBTree
#define DEFAULT_MAX_BUCKET_SIZE 60
#define DEFAULT_MAX_BTREE_SIZE 250
......
#define PERSISTENT
#define PREFIX "OO"
#define MOD_NAME_PREFIX "OO"
#define INITMODULE initOOBTree
#define DEFAULT_MAX_BUCKET_SIZE 30
#define DEFAULT_MAX_BTREE_SIZE 250
......
......@@ -250,7 +250,7 @@ set_repr(Bucket *self)
static PyObject *format;
PyObject *r, *t;
UNLESS (format) UNLESS (format=PyString_FromString(PREFIX "Set(%s)"))
UNLESS (format) UNLESS (format=PyString_FromString(MOD_NAME_PREFIX "Set(%s)"))
return NULL;
UNLESS (t=PyTuple_New(1)) return NULL;
UNLESS (r=bucket_keys(self,NULL)) goto err;
......@@ -306,7 +306,7 @@ static PySequenceMethods set_as_sequence = {
static PyExtensionClass SetType = {
PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
PREFIX "Set", /*tp_name*/
MOD_NAME_PREFIX "Set", /*tp_name*/
sizeof(Bucket), /*tp_basicsize*/
0, /*tp_itemsize*/
/*********** methods ***********************/
......
......@@ -194,7 +194,7 @@ static struct PyMethodDef TreeSet_methods[] = {
static PyExtensionClass TreeSetType = {
PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
PREFIX "TreeSet", /*tp_name*/
MOD_NAME_PREFIX "TreeSet", /*tp_name*/
sizeof(BTree), /*tp_basicsize*/
0, /*tp_itemsize*/
/************* methods ********************/
......
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