[pypy-commit] pypy default: fix translation for MSVC which doesn't like void* arithmetic
mattip
pypy.commits at gmail.com
Fri May 10 11:09:51 EDT 2019
Author: Matti Picus <matti.picus at gmail.com>
Branch:
Changeset: r96592:d4c7063c42e8
Date: 2019-05-10 06:14 -0700
http://bitbucket.org/pypy/pypy/changeset/d4c7063c42e8/
Log: fix translation for MSVC which doesn't like void* arithmetic
diff --git a/rpython/translator/c/gc.py b/rpython/translator/c/gc.py
--- a/rpython/translator/c/gc.py
+++ b/rpython/translator/c/gc.py
@@ -461,10 +461,10 @@
raise Exception("gc_pop_roots should be removed by postprocess_graph")
def OP_GC_ENTER_ROOTS_FRAME(self, funcgen, op):
- return '%s += sizeof(pypy_ss_t);' % (funcgen.gcpol_ss,)
+ return '(char *)(%s) += sizeof(pypy_ss_t);' % (funcgen.gcpol_ss,)
def OP_GC_LEAVE_ROOTS_FRAME(self, funcgen, op):
- return '%s -= sizeof(pypy_ss_t);' % (funcgen.gcpol_ss,)
+ return 'char *)(%s) -= sizeof(pypy_ss_t);' % (funcgen.gcpol_ss,)
def OP_GC_SAVE_ROOT(self, funcgen, op):
num = op.args[0].value
More information about the pypy-commit
mailing list