[PHP] Pass ZTS context through to t_output_helper() so it works

with a ZTS-enabled build of PHP.  Reported by Pierre Labastie in
github PR#155.
This commit is contained in:
Olly Betts 2014-04-02 23:23:22 +13:00
commit 18c00e20bc
3 changed files with 13 additions and 8 deletions

View file

@ -5,6 +5,11 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 3.0.1 (in progress)
===========================
2014-04-02: olly
[PHP] Pass ZTS context through to t_output_helper() so it works
with a ZTS-enabled build of PHP. Reported by Pierre Labastie in
github PR#155.
2014-03-28: wsfulton
[Java C# D Go] Fixes for C enums used in an API and the definition of the enum
has not been parsed. For D, this fixes a segfault in SWIG. The other languages

View file

@ -38,7 +38,7 @@
zval *o;
MAKE_STD_ZVAL(o);
ZVAL_BOOL(o,temp$argnum);
t_output_helper( &$result, o );
t_output_helper( &$result, o TSRMLS_CC );
}
%typemap(in) TYPE *REFERENCE (TYPE lvalue), TYPE &REFERENCE (TYPE lvalue)
%{
@ -67,7 +67,7 @@
zval *o;
MAKE_STD_ZVAL(o);
ZVAL_DOUBLE(o,temp$argnum);
t_output_helper( &$result, o );
t_output_helper( &$result, o TSRMLS_CC );
}
%typemap(in) TYPE *REFERENCE (TYPE dvalue), TYPE &REFERENCE (TYPE dvalue)
%{
@ -96,7 +96,7 @@
zval *o;
MAKE_STD_ZVAL(o);
ZVAL_LONG(o,temp$argnum);
t_output_helper( &$result, o );
t_output_helper( &$result, o TSRMLS_CC );
}
%typemap(in) TYPE *REFERENCE (TYPE lvalue), TYPE &REFERENCE (TYPE lvalue)
%{
@ -137,7 +137,7 @@ INT_TYPEMAP(long long);
sprintf(temp, "%lld", (long long)temp$argnum);
ZVAL_STRING(o, temp, 1);
}
t_output_helper( &$result, o );
t_output_helper( &$result, o TSRMLS_CC );
}
%typemap(in) TYPE *REFERENCE (long long lvalue)
%{
@ -178,7 +178,7 @@ INT_TYPEMAP(unsigned long long);
sprintf(temp, "%llu", (unsigned long long)temp$argnum);
ZVAL_STRING(o, temp, 1);
}
t_output_helper( &$result, o );
t_output_helper( &$result, o TSRMLS_CC );
}
%typemap(in) TYPE *REFERENCE (unsigned long long lvalue)
%{
@ -276,12 +276,12 @@ INT_TYPEMAP(unsigned long long);
%}
%typemap(in,numinputs=0) char OUTPUT[ANY] ( char temp[$1_dim0] )
"$1 = temp;";
%typemap(argout) char OUTPUT[ANY]
%typemap(argout,fragment="t_output_helper") char OUTPUT[ANY]
{
zval *o;
MAKE_STD_ZVAL(o);
ZVAL_STRINGL(o,temp$argnum,$1_dim0);
t_output_helper( &$result, o );
t_output_helper( &$result, o TSRMLS_CC );
}
%typemap(in,numinputs=0) void **OUTPUT (int force),

View file

@ -91,7 +91,7 @@
%fragment("t_output_helper","header") %{
static void
t_output_helper( zval **target, zval *o) {
t_output_helper(zval **target, zval *o TSRMLS_DC) {
if ( (*target)->type == IS_ARRAY ) {
/* it's already an array, just append */
add_next_index_zval( *target, o );