Rationale of capi?

Ian Lynagh ian at well-typed.com
Sun Oct 7 17:53:53 CEST 2012

On Sun, Oct 07, 2012 at 03:34:45PM +0300, Lauri Alanko wrote:
> In fact, function-like
> macros are (or should be) a rarity, since inline functions serve the
> same purpose better.
> So to me "capi" seems to buy very little, and it only supports
> strangely specific needs.

In theory, perhaps. In practice, at least one platform defining a
standard function with something like

    #define fopen fopen64

is common, and I think the standard explicitly allows many such
functions to be defined as macros. We certainly use capi a lot in the
standard libraries.


More information about the FFI mailing list