Fix compiler warnings in generated code when using -std=c++98 -std=gnu89 -pedantic -Wreturn-type
This commit is contained in:
parent
f39ed94419
commit
3191473523
9 changed files with 80 additions and 60 deletions
|
|
@ -34,12 +34,12 @@
|
|||
SWIGTYPE &&,
|
||||
SWIGTYPE [] {
|
||||
zval *z_var;
|
||||
zend_constant c;
|
||||
size_t len = sizeof("$symname") - 1;
|
||||
MAKE_STD_ZVAL(z_var);
|
||||
SWIG_SetPointerZval(z_var, (void*)$value, $1_descriptor, 0);
|
||||
zend_constant c;
|
||||
c.value = *z_var;
|
||||
zval_copy_ctor(&c.value);
|
||||
size_t len = sizeof("$symname") - 1;
|
||||
c.name = zend_strndup("$symname", len);
|
||||
c.name_len = len+1;
|
||||
c.flags = CONST_CS | CONST_PERSISTENT;
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@
|
|||
%fragment("t_output_helper","header") %{
|
||||
static void
|
||||
t_output_helper(zval **target, zval *o TSRMLS_DC) {
|
||||
zval *tmp;
|
||||
if ( (*target)->type == IS_ARRAY ) {
|
||||
/* it's already an array, just append */
|
||||
add_next_index_zval( *target, o );
|
||||
|
|
@ -102,7 +103,6 @@ t_output_helper(zval **target, zval *o TSRMLS_DC) {
|
|||
FREE_ZVAL(o);
|
||||
return;
|
||||
}
|
||||
zval *tmp;
|
||||
ALLOC_INIT_ZVAL(tmp);
|
||||
*tmp = **target;
|
||||
zval_copy_ctor(tmp);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue