public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Reuben Thomas <rrt@sc3d.org>
To: libffi-discuss@sourceware.org
Subject: size_t and ptrdiff_t
Date: Tue, 18 Sep 2012 23:34:00 -0000	[thread overview]
Message-ID: <CAOnWdohc6E+EqSd9ireec9u7QuADdS7Aq744tqqhgELCxjHpVg@mail.gmail.com> (raw)

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

                 reply	other threads:[~2012-09-18 23:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOnWdohc6E+EqSd9ireec9u7QuADdS7Aq744tqqhgELCxjHpVg@mail.gmail.com \
    --to=rrt@sc3d.org \
    --cc=libffi-discuss@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).