FIx a couple issues in the pi generator where it is not generating proper code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2011-12-31 02:45:21 +00:00
parent 0b4f57082d
commit c001fd35f6

View File

@@ -178,8 +178,11 @@ class PiWrapperGenerator(generators.WrapperGeneratorBase):
#-----------------------------------------------------------------------
def generatePyCode(self, pc, stream, indent=''):
assert isinstance(pc, extractors.PyCodeDef)
code = pc.code
if hasattr(pc, 'klass'):
code = code.replace(pc.klass.name+'.', '') # TODO: Check this
stream.write('\n')
stream.write(nci(pc.code, len(indent)))
stream.write(nci(code, len(indent)))
#-----------------------------------------------------------------------
def generatePyFunction(self, pf, stream, indent=''):
@@ -442,7 +445,7 @@ def guessTypeInt(v):
return True
type = v.type.replace('const', '')
type = type.replace(' ', '')
if type in ['int', 'long', 'byte', 'size_t']:
if type in ['int', 'long', 'byte', 'size_t', 'wxCoord']:
return True
if 'unsigned' in type:
return True