Commit 15d529ae authored by Guido van Rossum's avatar Guido van Rossum

Bugfix candidate.

Adapter from SF patch 528038; fixes SF bug 527816.

The wrapper for __nonzero__ should be wrap_inquiry rather than
wrap_unaryfunc, since the slot returns an int, not a PyObject *.
parent a2168ece
......@@ -426,6 +426,9 @@ def numops(a, b, skip=[]):
def ints():
if verbose: print "Testing int operations..."
numops(100, 3)
# The following crashes in Python 2.2
vereq((1).__nonzero__(), 1)
vereq((0).__nonzero__(), 0)
def longs():
if verbose: print "Testing long operations..."
......
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