Fixes to support Python 3.0.1 and higher.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11143 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
fcf2d3ddb8
commit
caa6f2b9fa
4 changed files with 32 additions and 17 deletions
|
|
@ -1,8 +1,5 @@
|
|||
|
||||
from swigobject import *
|
||||
from string import replace
|
||||
from string import upper
|
||||
from string import lstrip
|
||||
|
||||
a = A()
|
||||
|
||||
|
|
@ -17,12 +14,12 @@ if a1.this != a2.this:
|
|||
lthis = long(a.this)
|
||||
# match pointer value, but deal with leading zeros on 8/16 bit systems and different C++ compilers interpretation of %p
|
||||
xstr1 = "%016X" % (lthis,)
|
||||
xstr1 = lstrip(xstr1, '0')
|
||||
xstr1 = str.lstrip(xstr1, '0')
|
||||
xstr2 = pointer_str(a)
|
||||
xstr2 = replace(xstr2, "0x", "")
|
||||
xstr2 = replace(xstr2, "0X", "")
|
||||
xstr2 = lstrip(xstr2, '0')
|
||||
xstr2 = upper(xstr2)
|
||||
xstr2 = str.replace(xstr2, "0x", "")
|
||||
xstr2 = str.replace(xstr2, "0X", "")
|
||||
xstr2 = str.lstrip(xstr2, '0')
|
||||
xstr2 = str.upper(xstr2)
|
||||
|
||||
if xstr1 != xstr2:
|
||||
print xstr1, xstr2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue