Commit 2312b607 authored by 's avatar

merged fix (change PREFIX macro to MOD_NAME_PREFIX)

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