Update of /cvsroot/ctypes/ctypes/sandbox/tools/codegen
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7735
Modified Files:
codegenerator.py
Log Message:
Disable the get_real_type function - I currently do not remember why
it was there.
Allow typedesc.Function to have a dllname attribute specifying the dll
that exports it.
Index: codegenerator.py
===================================================================
RCS file: /cvsroot/ctypes/ctypes/sandbox/tools/codegen/codegenerator.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** codegenerator.py 24 Jan 2005 12:48:08 -0000 1.34
--- codegenerator.py 25 Jan 2005 15:06:59 -0000 1.35
***************
*** 117,122 ****
def get_real_type(tp):
! if type(tp) is typedesc.Typedef:
! return get_real_type(tp.typ)
return tp
--- 117,123 ----
def get_real_type(tp):
! # why was this?
! ## if type(tp) is typedesc.Typedef:
! ## return get_real_type(tp.typ)
return tp
***************
*** 374,380 ****
return
print >> self.stream, \
! "%s = %r # %s" % (tp.name,
! value,
! self.type_name(tp.typ, False))
self.names.add(tp.name)
--- 375,381 ----
return
print >> self.stream, \
! "%s = %r # Variable %s" % (tp.name,
! value,
! self.type_name(tp.typ, False))
self.names.add(tp.name)
***************
*** 493,497 ****
self.done.add(body)
! def find_dllname(self, name):
for dll in self.searched_dlls:
try:
--- 494,501 ----
self.done.add(body)
! def find_dllname(self, func):
! if hasattr(func, "dllname"):
! return func.dllname
! name = func.name
for dll in self.searched_dlls:
try:
***************
*** 621,625 ****
if func in self.done:
return
! dllname = self.find_dllname(func.name)
if dllname:
self.generate(func.returns)
--- 625,629 ----
if func in self.done:
return
! dllname = self.find_dllname(func)
if dllname:
self.generate(func.returns)
|