[Zodb-checkins] CVS: Zope3/src/zodb/btrees - _zodb_btrees_IIBTree.c:1.1 _zodb_btrees_IOBTree.c:1.1 _zodb_btrees_OIBTree.c:1.1 _zodb_btrees_OOBTree.c:1.1 _zodb_btrees_fsBTree.c:1.1 BTreeModuleTemplate.c:1.7 IIBTree.py:1.3 IOBTree.py:1.3 OIBTree.py:1.3 OOBTree.py:1.3 fsBTree.py:1.3 _IIBTree.c:NONE _IOBTree.c:NONE _OIBTree.c:NONE _OOBTree.c:NONE _fsBTree.c:NONE

Jim Fulton jim at zope.com
Thu May 8 17:39:47 EDT 2003


Update of /cvs-repository/Zope3/src/zodb/btrees
In directory cvs.zope.org:/tmp/cvs-serv1687/src/zodb/btrees

Modified Files:
	BTreeModuleTemplate.c IIBTree.py IOBTree.py OIBTree.py 
	OOBTree.py fsBTree.py 
Added Files:
	_zodb_btrees_IIBTree.c _zodb_btrees_IOBTree.c 
	_zodb_btrees_OIBTree.c _zodb_btrees_OOBTree.c 
	_zodb_btrees_fsBTree.c 
Removed Files:
	_IIBTree.c _IOBTree.c _OIBTree.c _OOBTree.c _fsBTree.c 
Log Message:
Renamed the extension modules in zodb.btrees to avoid dynamic library
name conflicts with extensions in Zope 2.  Some dynamic linkers can't
tell the difference between _OOBTrees.so in the BTrees package and
_OOBTrees.so in the zodb.btrees package.


=== Added File Zope3/src/zodb/btrees/_zodb_btrees_IIBTree.c ===
/* Setup template macros */

#define MASTER_ID "$Id: _zodb_btrees_IIBTree.c,v 1.1 2003/05/08 20:39:45 jim Exp $\n"

#define PERSISTENT

#define MOD_NAME_PREFIX "II"
#define INITMODULE init_zodb_btrees_IIBTree
#define DEFAULT_MAX_BUCKET_SIZE 120
#define DEFAULT_MAX_BTREE_SIZE 500

#include "intkeymacros.h"
#include "intvaluemacros.h"
#include "BTreeModuleTemplate.c"


=== Added File Zope3/src/zodb/btrees/_zodb_btrees_IOBTree.c ===

#define MASTER_ID "$Id: _zodb_btrees_IOBTree.c,v 1.1 2003/05/08 20:39:45 jim Exp $\n"

#define PERSISTENT

#define MOD_NAME_PREFIX "IO"
#define DEFAULT_MAX_BUCKET_SIZE 60
#define DEFAULT_MAX_BTREE_SIZE 500
#define INITMODULE init_zodb_btrees_IOBTree
                                
#include "intkeymacros.h"
#include "objectvaluemacros.h"
#include "BTreeModuleTemplate.c"


=== Added File Zope3/src/zodb/btrees/_zodb_btrees_OIBTree.c ===

#define MASTER_ID "$Id: _zodb_btrees_OIBTree.c,v 1.1 2003/05/08 20:39:45 jim Exp $\n"

#define PERSISTENT

#define MOD_NAME_PREFIX "OI"
#define INITMODULE init_zodb_btrees_OIBTree
#define DEFAULT_MAX_BUCKET_SIZE 60
#define DEFAULT_MAX_BTREE_SIZE 250
                                
#include "objectkeymacros.h"
#include "intvaluemacros.h"
#include "BTreeModuleTemplate.c"


=== Added File Zope3/src/zodb/btrees/_zodb_btrees_OOBTree.c ===

#define MASTER_ID "$Id: _zodb_btrees_OOBTree.c,v 1.1 2003/05/08 20:39:45 jim Exp $\n"

#define PERSISTENT

#define MOD_NAME_PREFIX "OO"
#define INITMODULE init_zodb_btrees_OOBTree
#define DEFAULT_MAX_BUCKET_SIZE 30
#define DEFAULT_MAX_BTREE_SIZE 250
                                
#include "objectkeymacros.h"
#include "objectvaluemacros.h"
#include "BTreeModuleTemplate.c"


=== Added File Zope3/src/zodb/btrees/_zodb_btrees_fsBTree.c ===
/* fsBTree - FileStorage index BTree

   This BTree implments a mapping from 2-character strings
   to six-character strings. This allows us to effieciently store
   a FileStorage index as a nested mapping of 6-character oid prefix
   to mapping of 2-character oid suffix to 6-character (byte) file
   positions.
*/

typedef unsigned char char2[2];
typedef unsigned char char6[6];

/* Setup template macros */

#define MASTER_ID "$Id: _zodb_btrees_fsBTree.c,v 1.1 2003/05/08 20:39:45 jim Exp $\n"

#define PERSISTENT

#define MOD_NAME_PREFIX "fs"
#define INITMODULE init_zodb_btrees_fsBTree
#define DEFAULT_MAX_BUCKET_SIZE 500
#define DEFAULT_MAX_BTREE_SIZE 500
                
/*#include "intkeymacros.h"*/

#define KEYMACROS_H "$Id: _zodb_btrees_fsBTree.c,v 1.1 2003/05/08 20:39:45 jim Exp $\n"
#define KEY_TYPE char2
#undef KEY_TYPE_IS_PYOBJECT
#define KEY_CHECK(K) (PyString_Check(K) && PyString_GET_SIZE(K)==2)
#define TEST_KEY_SET_OR(V, K, T) if ( ( (V) = ((*(K) < *(T) || (*(K) == *(T) && (K)[1] < (T)[1])) ? -1 : ((*(K) == *(T) && (K)[1] == (T)[1]) ? 0 : 1)) ), 0 )
#define DECREF_KEY(KEY)
#define INCREF_KEY(k)
#define COPY_KEY(KEY, E) (*(KEY)=*(E), (KEY)[1]=(E)[1])
#define COPY_KEY_TO_OBJECT(O, K) O=PyString_FromStringAndSize(K,2)
#define COPY_KEY_FROM_ARG(TARGET, ARG, STATUS) \
  if (KEY_CHECK(ARG)) memcpy(TARGET, PyString_AS_STRING(ARG), 2); else { \
      PyErr_SetString(PyExc_TypeError, "expected two-character string key"); \
      (STATUS)=0; } 

/*#include "intvaluemacros.h"*/
#define VALUEMACROS_H "$Id: _zodb_btrees_fsBTree.c,v 1.1 2003/05/08 20:39:45 jim Exp $\n"
#define VALUE_TYPE char6
#undef VALUE_TYPE_IS_PYOBJECT
#define TEST_VALUE(K, T) memcmp(K,T,6)
#define DECREF_VALUE(k)
#define INCREF_VALUE(k)
#define COPY_VALUE(V, E) (memcpy(V, E, 6))
#define COPY_VALUE_TO_OBJECT(O, K) O=PyString_FromStringAndSize(K,6)
#define COPY_VALUE_FROM_ARG(TARGET, ARG, STATUS) \
  if ((PyString_Check(ARG) && PyString_GET_SIZE(ARG)==6)) \
      memcpy(TARGET, PyString_AS_STRING(ARG), 6); else { \
      PyErr_SetString(PyExc_TypeError, "expected six-character string key"); \
      (STATUS)=0; } 
  
#define NORMALIZE_VALUE(V, MIN)
#include "BTreeModuleTemplate.c"


=== Zope3/src/zodb/btrees/BTreeModuleTemplate.c 1.6 => 1.7 ===
--- Zope3/src/zodb/btrees/BTreeModuleTemplate.c:1.6	Fri Apr 25 15:02:34 2003
+++ Zope3/src/zodb/btrees/BTreeModuleTemplate.c	Thu May  8 16:39:45 2003
@@ -472,7 +472,7 @@
     }
 
     /* Create the module and add the functions */
-    m = Py_InitModule4("_" MOD_NAME_PREFIX "BTree",
+    m = Py_InitModule4("_zodb_btrees_" MOD_NAME_PREFIX "BTree",
 		       module_methods, BTree_module_documentation,
 		       (PyObject *)NULL, PYTHON_API_VERSION);
 


=== Zope3/src/zodb/btrees/IIBTree.py 1.2 => 1.3 ===
--- Zope3/src/zodb/btrees/IIBTree.py:1.2	Wed Dec 25 09:12:16 2002
+++ Zope3/src/zodb/btrees/IIBTree.py	Thu May  8 16:39:45 2003
@@ -11,4 +11,4 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-from zodb.btrees._IIBTree import *
+from zodb.btrees._zodb_btrees_IIBTree import *


=== Zope3/src/zodb/btrees/IOBTree.py 1.2 => 1.3 ===
--- Zope3/src/zodb/btrees/IOBTree.py:1.2	Wed Dec 25 09:12:16 2002
+++ Zope3/src/zodb/btrees/IOBTree.py	Thu May  8 16:39:45 2003
@@ -11,4 +11,4 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-from zodb.btrees._IOBTree import *
+from zodb.btrees._zodb_btrees_IOBTree import *


=== Zope3/src/zodb/btrees/OIBTree.py 1.2 => 1.3 ===
--- Zope3/src/zodb/btrees/OIBTree.py:1.2	Wed Dec 25 09:12:16 2002
+++ Zope3/src/zodb/btrees/OIBTree.py	Thu May  8 16:39:45 2003
@@ -11,4 +11,4 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-from zodb.btrees._OIBTree import *
+from zodb.btrees._zodb_btrees_OIBTree import *


=== Zope3/src/zodb/btrees/OOBTree.py 1.2 => 1.3 ===
--- Zope3/src/zodb/btrees/OOBTree.py:1.2	Wed Dec 25 09:12:16 2002
+++ Zope3/src/zodb/btrees/OOBTree.py	Thu May  8 16:39:45 2003
@@ -11,4 +11,4 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-from zodb.btrees._OOBTree import *
+from zodb.btrees._zodb_btrees_OOBTree import *


=== Zope3/src/zodb/btrees/fsBTree.py 1.2 => 1.3 ===
--- Zope3/src/zodb/btrees/fsBTree.py:1.2	Wed Dec 25 09:12:16 2002
+++ Zope3/src/zodb/btrees/fsBTree.py	Thu May  8 16:39:45 2003
@@ -11,4 +11,4 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-from zodb.btrees._fsBTree import *
+from zodb.btrees._zodb_btrees_fsBTree import *

=== Removed File Zope3/src/zodb/btrees/_IIBTree.c ===

=== Removed File Zope3/src/zodb/btrees/_IOBTree.c ===

=== Removed File Zope3/src/zodb/btrees/_OIBTree.c ===

=== Removed File Zope3/src/zodb/btrees/_OOBTree.c ===

=== Removed File Zope3/src/zodb/btrees/_fsBTree.c ===




More information about the Zodb-checkins mailing list