[Pyrex] probably bug with extern ctypedef in Pyrex 0.9.5.1a

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Aug 2 02:19:54 CEST 2007


Alexander Belchenko wrote:

> cdef extern from "stdint.h":
>     ctypedef int intptr_t
> 
> cdef int _is_aligned(void *ptr):
>     return ((<intptr_t>ptr) & ((sizeof(int))-1)) == 0
> 
> But also for some reason substitute in generated C-code
> intptr_t with int. I think it's incorrect.

You're right, it's doing the wrong thing with typedefs
in casts and sizeof. I'll look into this.

Thanks,
Greg



More information about the Pyrex mailing list