Test-suite fixes for python -classic
These are mostly workarounds for static class members not being supported for old style classes, as documented in Python.html, "C++ classes".
This commit is contained in:
parent
39a75442a1
commit
76bcec1d87
18 changed files with 118 additions and 41 deletions
|
|
@ -1,4 +1,8 @@
|
|||
from overload_template_fast import *
|
||||
|
||||
def is_new_style_class(cls):
|
||||
return hasattr(cls, "__class__")
|
||||
|
||||
f = foo()
|
||||
|
||||
a = maximum(3,4)
|
||||
|
|
@ -140,6 +144,9 @@ if (nsoverload() != 1050):
|
|||
raise RuntimeError, ("nsoverload(const char *)")
|
||||
|
||||
|
||||
A.foo(1)
|
||||
if is_new_style_class(A):
|
||||
A.foo(1)
|
||||
else:
|
||||
A_foo(1)
|
||||
b = B()
|
||||
b.foo(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue