Php fix for -Wmissing-field-initializers warning

Use ZEND_FE_END (introduced sometime around 5.2) to obtain the correct
number of arguments for zend_function_entry. Fallback to the original
3 argument initializer if not defined, however, this will not fix the
initializer warning though for some older versions of PHP.
This commit is contained in:
William S Fulton 2015-12-19 13:44:36 +00:00
commit 6a61f8271f
2 changed files with 5 additions and 1 deletions

View file

@ -24,6 +24,10 @@ extern "C" {
# define SWIG_ZEND_NAMED_FE(ZN, N, A) ZEND_NAMED_FE(ZN, N, A)
#endif
#ifndef ZEND_FE_END
# define ZEND_FE_END { NULL, NULL, NULL }
#endif
#ifndef Z_SET_ISREF_P
/* For PHP < 5.3 */
# define Z_SET_ISREF_P(z) (z)->is_ref = 1