[ctypes-commit] ctypes/sandbox/tools/structures genapi.py,1.4,1.5
Brought to you by:
theller
From: Thomas H. <th...@us...> - 2004-09-10 21:34:17
|
Update of /cvsroot/ctypes/ctypes/sandbox/tools/structures In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14874 Modified Files: genapi.py Log Message: First, pass the objects with resolved dependencies, then the unresolved. Improve commenting out the failed code - this can now be uncommented in the output file with XEmacs more easily. Index: genapi.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/sandbox/tools/structures/genapi.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** genapi.py 10 Sep 2004 11:15:36 -0000 1.4 --- genapi.py 10 Sep 2004 11:42:03 -0000 1.5 *************** *** 98,103 **** class CodeGenerator(gccxmltools.Visitor): ! def __init__(self, *args, **kw): ! super(CodeGenerator, self).__init__(*args, **kw) self._env = {} self.try_code(HEADER) --- 98,102 ---- class CodeGenerator(gccxmltools.Visitor): ! def __init__(self): self._env = {} self.try_code(HEADER) *************** *** 161,165 **** except Exception, details: print "# --- %s: %s ---" % (details.__class__.__name__, details) ! print "# " + "\n# ".join(text.splitlines()) else: print text --- 160,164 ---- except Exception, details: print "# --- %s: %s ---" % (details.__class__.__name__, details) ! print "##" + "\n##".join(text.splitlines()) else: print text *************** *** 199,211 **** p = DependencyResolver(result) ! result, remaining = p.run() ! cg = CodeGenerator(result) ! cg.go() ! for o in remaining: ! print "#", o ! ## cg = CodeGenerator(result + list(remaining)) ! ## cg.go() --- 198,214 ---- p = DependencyResolver(result) ! resolved, unresolved = p.run() ! ## cg = CodeGenerator(result) ! ## cg.go() ! ## for o in remaining: ! ## print "#", o ! cg = CodeGenerator() ! cg.go(resolved) ! print ! print "################################################################" ! print ! cg.go(unresolved) |