diff options
author | Wim Lavrijsen <WLavrijsen@lbl.gov> | 2021-02-17 18:34:42 -0800 |
---|---|---|
committer | Wim Lavrijsen <WLavrijsen@lbl.gov> | 2021-02-17 18:34:42 -0800 |
commit | ab1dfed69cecfac16a40d03de38dcf03fb55a013 (patch) | |
tree | 81a9986e6a1d0a8990963246c5f57ec10b0e3005 | |
parent | fix C warning, lltype.Signed is a long, not an int (diff) | |
download | pypy-ab1dfed69cecfac16a40d03de38dcf03fb55a013.tar.gz pypy-ab1dfed69cecfac16a40d03de38dcf03fb55a013.tar.bz2 pypy-ab1dfed69cecfac16a40d03de38dcf03fb55a013.zip |
fix translation error on 32b Linux
-rw-r--r-- | pypy/module/_cppyy/capi/loadable_capi.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pypy/module/_cppyy/capi/loadable_capi.py b/pypy/module/_cppyy/capi/loadable_capi.py index b371c8ce47..2fa9b11dce 100644 --- a/pypy/module/_cppyy/capi/loadable_capi.py +++ b/pypy/module/_cppyy/capi/loadable_capi.py @@ -131,7 +131,8 @@ class W_RCTypeFunc(ctypefunc.W_CTypeFunc): elif obj.tc == 'm': misc.write_raw_signed_data(data, rffi.cast(rffi.INTPTR_T, obj._method), argtype.size) elif obj.tc == 'o': - misc.write_raw_signed_data(data, rffi.cast(rffi.VOIDP, obj._object), argtype.size) + # additional cast of void* to intptr_t required for 32b (or intmask fails) + misc.write_raw_signed_data(data, rffi.cast(rffi.INTPTR_T, rffi.cast(rffi.VOIDP, obj._object)), argtype.size) elif obj.tc == 'u': misc.write_raw_unsigned_data(data, rffi.cast(rffi.SIZE_T, obj._index), argtype.size) elif obj.tc == 'i': |