Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cython does not recognize ptrdiff_t #171

Closed
lindstro opened this issue Aug 9, 2022 · 0 comments
Closed

Cython does not recognize ptrdiff_t #171

lindstro opened this issue Aug 9, 2022 · 0 comments
Labels

Comments

@lindstro
Copy link
Member

lindstro commented Aug 9, 2022

Some versions of Cython do not recognize ptrdiff_t, causing compilation to fail:

Error compiling Cython file:
------------------------------------------------------------
...

    # structs
    ctypedef struct zfp_field:
        zfp_type _type "type"
        size_t nx, ny, nz, nw
        ptrdiff_t sx, sy, sz, sw
       ^
------------------------------------------------------------

python/zfpy.pxd:31:8: 'ptrdiff_t' is not a type identifier

Evidently, this type needs to be explicitly imported from libc.stddef.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants