mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Don't touch inline if C++ is compiled
Starting with C++11 marco keywords are forbidden by the standard. Things like inline namespaces would be broken by this part. As any of supported compilers is at least C++11 complaint, tricks with inline are simply disabled if C++ is compiled. Though, zend_always_inline is still usable, anything else about inlining for C++ is up to the compiler.
This commit is contained in:
parent
21e4ab1977
commit
d6267cd230
1 changed files with 2 additions and 7 deletions
|
@ -58,19 +58,14 @@ typedef unsigned int uint;
|
||||||
|
|
||||||
#define zend_sprintf sprintf
|
#define zend_sprintf sprintf
|
||||||
|
|
||||||
|
#ifndef __cplusplus
|
||||||
/* This will cause the compilation process to be MUCH longer, but will generate
|
/* This will cause the compilation process to be MUCH longer, but will generate
|
||||||
* a much quicker PHP binary
|
* a much quicker PHP binary
|
||||||
*/
|
*/
|
||||||
#ifdef ZEND_WIN32_FORCE_INLINE
|
#ifdef ZEND_WIN32_FORCE_INLINE
|
||||||
/* _ALLOW_KEYWORD_MACROS is only relevant for C++ */
|
|
||||||
# ifndef _ALLOW_KEYWORD_MACROS
|
|
||||||
# define _ALLOW_KEYWORD_MACROS
|
|
||||||
# endif
|
|
||||||
# undef inline
|
# undef inline
|
||||||
# define inline __forceinline
|
# define inline __forceinline
|
||||||
#elif !defined(ZEND_WIN32_KEEP_INLINE)
|
#endif
|
||||||
# undef inline
|
|
||||||
# define inline
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LIBZEND_EXPORTS
|
#ifdef LIBZEND_EXPORTS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue