[ZODB-Dev] BTreeModuleTemplate.c inflexibility

Martijn Faassen faassen@vet.uu.nl
Fri, 28 Feb 2003 14:02:39 +0100


Hi there,

I maintain a long long using BTree in my own source tree now, and it is
*almost* enough to just implement very simple .c files _LIBTree.c and
_LOBTree.c, as well as a special template .c file called llkeymacros.

Unfortunately when pickling I do run into an issue. BTreeModuleTemplate.c
defines a MODULE_NAME which is set to "zodb.btrees.". Since my own
BTree variants are stored somewhere else pickle starts to complain.

If I had the ability to define MODULE_NAME in my own  _LIBTree.c etc
this problem would go away, and I didn't need to include my own version of
BTreeModuleTemplate.c anymore.

So I suggest we change the code in BTreeModuleTemplate.c along the following
lines, from this:

#define MODULE_NAME "forest." MOD_NAME_PREFIX "BTree."

To this:

#ifndef MODULE_NAME
#define MODULE_NAME "zodb.btree.s"
#endif
#define MOD_NAME_PREFIX "Btree."

That would allow me to set my own MODULE_NAME.

(note that I'm talking about the version of ZODB in the latest Zope3 checkout
here)

Regards,

Martijn