[pypy-svn] r24173 - pypy/dist/pypy/translator/c
mwh at codespeak.net
mwh at codespeak.net
Thu Mar 9 14:22:15 CET 2006
Author: mwh
Date: Thu Mar 9 14:22:14 2006
New Revision: 24173
Modified:
pypy/dist/pypy/translator/c/primitive.py
Log:
don't ignore the .offset field in name_address !
Modified: pypy/dist/pypy/translator/c/primitive.py
==============================================================================
--- pypy/dist/pypy/translator/c/primitive.py (original)
+++ pypy/dist/pypy/translator/c/primitive.py Thu Mar 9 14:22:14 2006
@@ -86,10 +86,14 @@
if value is NULL:
return 'NULL'
assert isinstance(value, fakeaddress)
- if value.ob is None:
- return 'NULL'
+ if value.offset is None:
+ if value.ob is None:
+ return 'NULL'
+ else:
+ return db.get(value.ob)
else:
- return db.get(value.ob)
+ assert value.offset is not None
+ return '(void*)(((char*)(%s)) + (%s))'%(db.get(value.ob), db.get(value.offset))
PrimitiveName = {
Signed: name_signed,
More information about the Pypy-commit
mailing list