This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
size_t and ptrdiff_t
- From: Reuben Thomas <rrt at sc3d dot org>
- To: libffi-discuss at sourceware dot org
- Date: Wed, 19 Sep 2012 00:34:33 +0100
- Subject: size_t and ptrdiff_t
I want to bind memchr with libffi. memchr's prototype is:
void *memchr(const void *s, int c, size_t n);
void * and int I can bind with libffi, but I can't bind size_t.
It would be possible of course to use sizeof and assume that size_t
will correspond to ffi_type_uint32 or ffi_type_uint64, similar to the
code that produces ffi_type_uint, but I wondered if there was a reason
why it is not implemented as standard, like other non-concrete
standard types such as int and long, and whether a patch to add
support for size_t and ptrdiff_t would be welcomed.
--
http://rrt.sc3d.org