zfp icon indicating copy to clipboard operation
zfp copied to clipboard

Cython does not recognize ptrdiff_t

Open lindstro opened this issue 3 years ago • 0 comments

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.

lindstro avatar Aug 09 '22 19:08 lindstro