Re: C++ Extensions
| From: | Stanislav Malyshev | Date: | Wed, 19 Aug 2015 20:10:25 +0000 |
| Subject: | Re: C++ Extensions | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-87815@lists.php.net to get a copy of this message | ||
Hi!
> A) Adding those defines prior to including stdint.h
> B) Expecting C++ ext devs to define those before including php.h
> C) Modifying zend_long.h to use things like
> std::numeric_limits<int64_t>() when __cplusplus is defined
>
> A may (potentially) have unexpected side-effects
> B has precedent (see ext/intl/config.m4)
> C makes the ifdef block that's already there notably more complex
I'd rather have everything solved by php.h than having magic
incantations that one has to do prior to it. I would prefer A unless
there's really something wrong with it that. Given that these macros are
on their way out anyway:
https://sourceware.org/bugzilla/show_bug.cgi?id=15366
I'm not sure it's that dangerous to define them in the meantime.
--
Stas Malyshev
smalyshev@gmail.com