Repository navigation
intl: stop including headers as C extern - #24617
Conversation
Except for arginfo header as PHP_FUNCTION/PHP_METHOD are marked as U_CFUNC and ext/date/php_date.h header. We now specificy the header symbols that _need_ to follow the C function ABI, meaning in some places we drop U_CFUNC declarations and in others we add it.
| @@ -21,7 +20,6 @@ extern "C" { | |||
| #include <unicode/utf8.h> | |||
|
|
|||
| #include "uchar_arginfo.h" | |||
There was a problem hiding this comment.
am I correct to assume zim_IntlListFormatter_* has C linkage but zim_IntChar_* here has C++ ?
There was a problem hiding this comment.
Yes, because all the IntlChar methods are declared via the IC_METHOD macro which does not use U_CFUNC.
There was a problem hiding this comment.
Just asking because listformatter methods do not use U_CFUNC either but get C linkage with the BEGIN_EXTERN_C() part (for the listformatter_arginfo.h part to be precise).
There was a problem hiding this comment.
Yeah, I've been trying to find a way to get rid of including the arginfos via BEGIN_EXTERN_C() but some parts are entangled and quite complicated. Others are straight forward so I'll do follow-ups. :)
Ideally the whole extension should just be C++ IMHO.
There was a problem hiding this comment.
Ideally the whole extension should just be C++ IMHO.
yes I ve been patiently waiting to resume my plans.
Except for arginfo header as PHP_FUNCTION/PHP_METHOD are marked as U_CFUNC and ext/date/php_date.h header.
We now specificy the header symbols that need to follow the C function ABI, meaning in some places we drop U_CFUNC declarations and in others we add it.
Also use the
BEGIN_EXTERN_C()portability macro when possible so that searching for this is easier.I thought I needed #24378 before, but turns out we probably can drop the U_CFUNC in front of PHP_FUNCTION/PHP_METHOD as follow-ups.