Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 696
    • Issues 696
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Due to a massive storm of spam, registration on this instance now requires explicit administrator approval. Sorry for the added friction, we're also looking into automatic filtering options.

  • PyPyPyPy
  • pypypypy
  • Issues
  • #2930
Closed
Open
Issue created Dec 11, 2018 by Bitbucket Importer@bitbucket_importerMaintainer

memoryview(ctypes.Structure) does not produce the correct format string

Created originally on Bitbucket by mattip

The following passes on CPython, fails on PyPy (mv.format is B)

class Struct(Structure):
    _fields_ = [('a', c_int16)]

Struct3 = 3 * Struct

c_array = (2 * Struct3)(
    Struct3(Struct(a=1), Struct(a=2), Struct(a=3)),
    Struct3(Struct(a=4), Struct(a=5), Struct(a=6))
)

mv = memoryview(c_array)
assert mv.format == 'T{<h:a:}'

The memoryview call goes to _CData.__buffer__ in lib_pypy._ctypes.basics.py, which should not just call buffer(self._buffer)

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