Patch for libeio

Pierre-Yves Kerembellec py.kerembellec at gmail.com
Tue Mar 6 11:40:41 CET 2012


>> - remove trailing commas in enums in eio.h (since C++ does not allow them).
> 
> Hmm, libeio is C, not C++, but even C++ does allow trailing commans in
> enums, see 7.2p1:
> 
>   enum-specifier:
>        enum-head { enumerator-list(opt) }
>        enum-head { enumerator-list , }

But it can be used from C++, right ? You are right for C++0x, but apparently not for the
previous versions. http://stackoverflow.com/questions/6372650/trailing-commas-and-c

>> - add an opaque applicative pointer in eio_init, passed to both want_poll_cb and done_poll_cb
>>  callbacks afterwards (this is not to support multiple event loops but to ease C++ integration
>>  when the event loop is not a globally-accessible static symbol but part of an object members
>>  instead).
> 
> Since that's equivalent to using a global variable (or a static
> object member), what would the purpose of the patch be except to add
> overhead? What aspect of C++ integration would become easier?

Indeed, it's to avoid using a static class member (which I do not really fancy personally).
Is this really a big overhead?

Regards,
Pierre-Yves




More information about the libev mailing list