Author: Armin Rigo <[email protected]>
Branch:
Changeset: r44248:c2ef69b1dd56
Date: 2011-05-17 15:55 +0200
http://bitbucket.org/pypy/pypy/changeset/c2ef69b1dd56/
Log: merge heads
diff --git a/pypy/translator/c/funcgen.py b/pypy/translator/c/funcgen.py
--- a/pypy/translator/c/funcgen.py
+++ b/pypy/translator/c/funcgen.py
@@ -705,7 +705,7 @@
offset = self.expr(op.args[2])
value = self.expr(op.args[3])
typename = cdecl(self.db.gettype(TYPE).replace('@', '*@'), '')
- return "*(((%(typename)s) %(addr)s ) + %(offset)s) = %(value)s;" %
locals()
+ return "((%(typename)s) %(addr)s)[%(offset)s] = %(value)s;" % locals()
def OP_RAW_LOAD(self, op):
addr = self.expr(op.args[0])
@@ -713,7 +713,7 @@
offset = self.expr(op.args[2])
result = self.expr(op.result)
typename = cdecl(self.db.gettype(TYPE).replace('@', '*@'), '')
- return "%(result)s = *(((%(typename)s) %(addr)s ) + %(offset)s);" %
locals()
+ return "%(result)s = ((%(typename)s) %(addr)s)[%(offset)s];" % locals()
def OP_CAST_PRIMITIVE(self, op):
TYPE = self.lltypemap(op.result)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit