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,5 +1,8 @@
|
|||
from li_boost_shared_ptr_bits import *
|
||||
|
||||
def is_new_style_class(cls):
|
||||
return hasattr(cls, "__class__")
|
||||
|
||||
def check(nd):
|
||||
nd.i = 200
|
||||
i = nd.i
|
||||
|
|
@ -30,5 +33,8 @@ if sum != 66:
|
|||
raise "sum is wrong"
|
||||
|
||||
################################
|
||||
p = HiddenDestructor.create()
|
||||
if is_new_style_class(HiddenDestructor):
|
||||
p = HiddenDestructor.create()
|
||||
else:
|
||||
p = HiddenDestructor_create()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue