This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]