Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
pypy
pypy
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 603
    • Issues 603
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 13
    • Merge Requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyPy
  • pypypypy
  • Issues
  • #3201

Closed
Open
Created Mar 30, 2020 by Dang Trung Tin@dangtrungtin

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?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None