mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
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 *.
This commit is contained in:
parent
a2168eceb0
commit
15d529aec5
1 changed files with 3 additions and 0 deletions
|
@ -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..."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue