[Zodb-checkins] CVS: StandaloneZODB/BTrees - _fsBTree.c:1.1.6.1 BTreeModuleTemplate.c:1.15.8.1 BucketTemplate.c:1.21.8.1 IIBTree.py:1.3.8.1 IOBTree.py:1.3.8.1 Interfaces.py:1.7.8.1 Length.py:1.4.8.1 OIBTree.py:1.3.8.1 OOBTree.py:1.3.8.1 convert.py:1.4.8.1 Setup:NONE
Jeremy Hylton
jeremy@zope.com
Tue, 18 Dec 2001 12:04:16 -0500
Update of /cvs-repository/StandaloneZODB/BTrees
In directory cvs.zope.org:/tmp/cvs-serv28929/BTrees
Modified Files:
Tag: Standby-branch
BTreeModuleTemplate.c BucketTemplate.c IIBTree.py IOBTree.py
Interfaces.py Length.py OIBTree.py OOBTree.py convert.py
Added Files:
Tag: Standby-branch
_fsBTree.c
Removed Files:
Tag: Standby-branch
Setup
Log Message:
Merge StandaloneZODB-1_0-branch into Standby-branch
=== Added File StandaloneZODB/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.
*/
#include <string.h>
typedef unsigned char char2[2];
typedef unsigned char char6[6];
/* Setup template macros */
#define MASTER_ID "$Id: _fsBTree.c,v 1.1.6.1 2001/12/18 17:03:45 jeremy Exp $\n"
#define PERSISTENT
#define MOD_NAME_PREFIX "fs"
#define INITMODULE init_fsBTree
#define DEFAULT_MAX_BUCKET_SIZE 500
#define DEFAULT_MAX_BTREE_SIZE 500
/*#include "intkeymacros.h"*/
#define KEYMACROS_H "$Id: _fsBTree.c,v 1.1.6.1 2001/12/18 17:03:45 jeremy Exp $\n"
#define KEY_TYPE char2
#define KEY_CHECK(K) (PyString_Check(K) && PyString_GET_SIZE(K)==2)
#define TEST_KEY(K, T) ((*(K) < *(T) || (*(K) == *(T) && (K)[1] < (T)[1])) ? -1 : ((*(K) == *(T) && (K)[1] == (T)[1]) ? 0 : 1))
#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: _fsBTree.c,v 1.1.6.1 2001/12/18 17:03:45 jeremy Exp $\n"
#define VALUE_TYPE char6
#define TEST_VALUE(K, T) strncmp(K,T,6)
#define DECLARE_VALUE(NAME) VALUE_TYPE NAME
#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"
=== StandaloneZODB/BTrees/BTreeModuleTemplate.c 1.15 => 1.15.8.1 ===
if (m != NULL) {
- c = PyObject_GetAttrString(m,"ConflictError");
+ c = PyObject_GetAttrString(m, "BTreesConflictError");
if (c != NULL)
ConflictError = c;
Py_DECREF(m);
@@ -362,8 +362,4 @@
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 " MOD_NAME_PREFIX "BTree");
}
=== StandaloneZODB/BTrees/BucketTemplate.c 1.21 => 1.21.8.1 ===
=== StandaloneZODB/BTrees/IIBTree.py 1.3 => 1.3.8.1 ===
+# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE
-#
-##############################################################################
+# Version 1.1 (ZPL). A copy of the ZPL should accompany this
+# distribution. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL
+# EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST
+# INFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
# hack to overcome dynamic-linking headache.
from _IIBTree import *
=== StandaloneZODB/BTrees/IOBTree.py 1.3 => 1.3.8.1 ===
+# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE
-#
-##############################################################################
+# Version 1.1 (ZPL). A copy of the ZPL should accompany this
+# distribution. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL
+# EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST
+# INFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
# hack to overcome dynamic-linking headache.
from _IOBTree import *
=== StandaloneZODB/BTrees/Interfaces.py 1.7 => 1.7.8.1 ===
+# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE
-#
-##############################################################################
+# Version 1.1 (ZPL). A copy of the ZPL should accompany this
+# distribution. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL
+# EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST
+# INFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
import OOBTree, Interface, Interface.Standard
=== StandaloneZODB/BTrees/Length.py 1.4 => 1.4.8.1 ===
+# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE
-#
-##############################################################################
+# Version 1.1 (ZPL). A copy of the ZPL should accompany this
+# distribution. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL
+# EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST
+# INFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
import Persistence
=== StandaloneZODB/BTrees/OIBTree.py 1.3 => 1.3.8.1 ===
+# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE
-#
-##############################################################################
+# Version 1.1 (ZPL). A copy of the ZPL should accompany this
+# distribution. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL
+# EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST
+# INFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+
# hack to overcome dynamic-linking headache.
from _OIBTree import *
=== StandaloneZODB/BTrees/OOBTree.py 1.3 => 1.3.8.1 ===
+# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE
-#
-##############################################################################
+# Version 1.1 (ZPL). A copy of the ZPL should accompany this
+# distribution. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL
+# EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST
+# INFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
# hack to overcome dynamic-linking headache.
from _OOBTree import *
=== StandaloneZODB/BTrees/convert.py 1.4 => 1.4.8.1 ===
+# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE
-#
-##############################################################################
+# Version 1.1 (ZPL). A copy of the ZPL should accompany this
+# distribution. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL
+# EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST
+# INFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
def convert(old, new, threshold=200, f=None, None=None):
"Utility for converting old btree to new"
=== Removed File StandaloneZODB/BTrees/Setup ===