Commit bfdd90aa authored by Tim Peters's avatar Tim Peters

Repair description of TEST_VALUE (the TEST_KEY text it referenced

vanished).
parent 6b92cb69
......@@ -43,15 +43,14 @@ set a TypeError exception.
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 @@ Macros for Values
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.
......
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