[Zodb-checkins] CVS: Zope/lib/python/BTrees - Maintainer.txt:1.4
Tim Peters
tim.one@comcast.net
Fri, 31 May 2002 10:11:56 -0400
Update of /cvs-repository/Zope/lib/python/BTrees
In directory cvs.zope.org:/tmp/cvs-serv22346
Modified Files:
Maintainer.txt
Log Message:
Repair description of TEST_VALUE (the TEST_KEY text it referenced
vanished).
=== Zope/lib/python/BTrees/Maintainer.txt 1.3 => 1.4 ===
set a TypeError exception.
-TEST_KEY_SET_OR(V, K, T)
+TEST_KEY_SET_OR(V, K, T)
Like Python's cmp(). Compares K(ey) to T(arget), where K & T are C
-data values of type KEY_TYPE).
+values of type KEY_TYPE. V is assigned an int value depending on
+the outcome:
< 0 if K < T
== 0 if K == T
> 0 if K > T
-The value is assigned to V. This macro acts like an 'if',
-where the following statement is executed only if a Python exception
-has been raised because the values could not be compared.
-
-
+This macro acts like an 'if', where the following statement is
+executed only if a Python exception has been raised because the
+values could not be compared.
DECREF_KEY(K)
K is a value of KEY_TYPE. If KEY_TYPE is a flavor of PyObject*, write
@@ -85,8 +84,14 @@
VALUE_TYPE
The C type declaration for values (e.g., int or PyObject*).
-TEST_VALUE(K, T)
-Like TEST_KEY, except applied to values of VALUE_TYPE.
+TEST_VALUE(X, Y)
+Like Python's cmp(). Compares X to Y, where X & Y are C values of
+type VALUE_TYPE. The macro returns an int, with value
+ < 0 if X < Y
+ == 0 if X == Y
+ > 0 if X > Y
+XXX There is no provision for determining whether the comparison
+attempt failed (set a Python exception).
DECREF_VALUE(K)
Like DECREF_KEY, except applied to values of VALUE_TYPE.