[pypy-svn] r15374 - pypy/dist/pypy/translator/c
arigo at codespeak.net
arigo at codespeak.net
Fri Jul 29 21:13:19 CEST 2005
Author: arigo
Date: Fri Jul 29 21:13:18 2005
New Revision: 15374
Modified:
pypy/dist/pypy/translator/c/genc.py
Log:
We need to forward-declare all structs, because (argh argh argh) in C
a "struct X" that first occurs in a function arguments list will be declared
with a scope local to that argument list! Useless.
Modified: pypy/dist/pypy/translator/c/genc.py
==============================================================================
--- pypy/dist/pypy/translator/c/genc.py (original)
+++ pypy/dist/pypy/translator/c/genc.py Fri Jul 29 21:13:18 2005
@@ -61,6 +61,9 @@
print >> f, '/*** Structure definitions ***/'
print >> f
for node in structdeflist:
+ print >> f, 'struct %s;' % node.name
+ print >> f
+ for node in structdeflist:
for line in node.definition(phase=1):
print >> f, line
print >> f
More information about the Pypy-commit
mailing list