Pypy error when using cppyy.ll
I do as the example as https://cppyy.readthedocs.io/en/latest/lowlevel.html and have error:
At the file test.pytest.py:
import cppyy; from cppyy import ll
cppyy.cppdef(""" void* get_data(int sz) { int* iptr = (int*)malloc(sizeof(int)*sz); for (int i=0; i<sz; ++i) iptr[i] = i; return iptr; }""")
NDATA = 4
d = cppyy.gbl.get_data(NDATA)
print(d)
d = cppyy.ll.cast'int*'
d.reshape((NDATA,))
print(list(d))
When I run with python3, the result is ok (like in the document) :
[test.py]<cppyy.LowLevelView object at 0x7f81f9001930> [0, 1, 2, 3]
But I have error when run with Pypy7.3.0 - Python 3.6.9:
<_rawffi array 19379d0 of length 1152921504606846975> Traceback (most recent call last): File "test.py", line 17, in d = cppyy.ll.cast'int*' TypeError: none of the 0 overloaded methods succeeded. Full details:
Can you tell me how to solve it in PYPY?