Hi,
On Wed, 18 Oct 2017 at 03:52, Chiong Ching Lai <
chion...@gmail.com> wrote:
> In [12]: ffi=cffi.FFI()
> In [13]: ffi.new("size_t*")
> In [14]: ffi.cdef("typedef char size_t;", override=True)
> In [15]: ffi.new("size_t*")
> Out[15]: <cdata 'size_t *' owning 8 bytes>
>
> ffi2=cffi.FFI()
> In [7]: ffi2.cdef("typedef char size_t;")
> In [8]: ffi2.new("size_t*")
> Out[8]: <cdata 'char *' owning 1 bytes>
Sorry, replying to a one-year-old mail.
This is a bug; I've opened
https://bitbucket.org/cffi/cffi/issues/397/overriding-standard-type-names-has-no
. Likely, it should complain that you can't override a standard type
like "size_t" after you have used it. It's unclear if it's useful to
let you override it anyway even with ``override=True``. Thanks for
the report!
A bientôt,
Armin.