Fix Python 2 builtin tp_hash hashfunc closure regression when using "python:slot"
Closes https://github.com/swig/swig/issues/843
This commit is contained in:
parent
94e7482e48
commit
4963a7f88f
4 changed files with 35 additions and 3 deletions
|
|
@ -12,10 +12,14 @@ if is_python_builtin():
|
|||
if h != h2:
|
||||
raise RuntimeError("default tp_hash not working")
|
||||
|
||||
# Test 1 for tp_hash
|
||||
# Test 1a for tp_hash
|
||||
if hash(SimpleValue(222)) != 222:
|
||||
raise RuntimeError("tp_hash not working")
|
||||
|
||||
# Test 1b for tp_hash
|
||||
if hash(SimpleValue2(333)) != 333:
|
||||
raise RuntimeError("tp_hash not working")
|
||||
|
||||
# Test 2 for tp_hash
|
||||
try:
|
||||
# Was incorrectly raising: SystemError: error return without exception set
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue