Author: Armin Rigo <[email protected]>
Branch: stmgc-c7
Changeset: r76022:19cb65723b8c
Date: 2015-02-20 20:13 +0100
http://bitbucket.org/pypy/pypy/changeset/19cb65723b8c/
Log: stm fix
diff --git a/rpython/translator/c/funcgen.py b/rpython/translator/c/funcgen.py
--- a/rpython/translator/c/funcgen.py
+++ b/rpython/translator/c/funcgen.py
@@ -678,9 +678,13 @@
OP_CAST_PTR_TO_ADR = OP_CAST_POINTER
def OP_LENGTH_OF_SIMPLE_GCARRAY_FROM_OPAQUE(self, op):
- return ('%s = *(long *)(((char *)%s) + sizeof(struct pypy_header0));'
+ header0 = 'struct pypy_header0'
+ if hasattr(self.db.gcpolicy, 'headertype'):
+ header0 = self.db.gcpolicy.headertype('')
+ return ('%s = *(long *)(((char *)%s) + sizeof(%s));'
' /* length_of_simple_gcarray_from_opaque */'
- % (self.expr(op.result), self.expr(op.args[0])))
+ % (self.expr(op.result), self.expr(op.args[0]),
+ header0))
def OP_CAST_INT_TO_PTR(self, op):
TYPE = self.lltypemap(op.result)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit