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:
parent
ec8a5c71cb
commit
6a61f8271f
2 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -639,7 +639,7 @@ public:
|
|||
Printv(f_begin, all_cs_entry, "\n\n", s_arginfo, "\n\n", s_entry,
|
||||
" SWIG_ZEND_NAMED_FE(swig_", module, "_alter_newobject,_wrap_swig_", module, "_alter_newobject,NULL)\n"
|
||||
" SWIG_ZEND_NAMED_FE(swig_", module, "_get_newobject,_wrap_swig_", module, "_get_newobject,NULL)\n"
|
||||
"{NULL, NULL, NULL}\n};\n\n", NIL);
|
||||
" ZEND_FE_END\n};\n\n", NIL);
|
||||
Printv(f_begin, s_init, NIL);
|
||||
Delete(s_header);
|
||||
Delete(s_wrappers);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue