Skip to content

Commit

Permalink
fix ZTS build and sync with HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
tony2001 committed Apr 14, 2008
1 parent 5fcd852 commit eb5afe0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ext/standard/streamsfuncs.c
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ static void user_space_stream_notifier_dtor(php_stream_notifier *notifier)
}
}

static int parse_context_options(php_stream_context *context, zval *options)
static int parse_context_options(php_stream_context *context, zval *options TSRMLS_DC)
{
HashPosition pos, opos;
zval **wval, **oval;
Expand All @@ -874,15 +874,15 @@ static int parse_context_options(php_stream_context *context, zval *options)
}

} else {
zend_error(E_WARNING, "options should have the form [\"wrappername\"][\"optionname\"] = $value");
php_error_docref(NULL TSRMLS_CC, E_WARNING, "options should have the form [\"wrappername\"][\"optionname\"] = $value");
}
zend_hash_move_forward_ex(Z_ARRVAL_P(options), &pos);
}

return ret;
}

static int parse_context_params(php_stream_context *context, zval *params)
static int parse_context_params(php_stream_context *context, zval *params TSRMLS_DC)
{
int ret = SUCCESS;
zval **tmp;
Expand All @@ -902,7 +902,7 @@ static int parse_context_params(php_stream_context *context, zval *params)
}
if (SUCCESS == zend_hash_find(Z_ARRVAL_P(params), "options", sizeof("options"), (void**)&tmp)) {
if (Z_TYPE_PP(tmp) == IS_ARRAY) {
parse_context_options(context, *tmp);
parse_context_options(context, *tmp TSRMLS_CC);
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid stream/context parameter");
}
Expand Down Expand Up @@ -988,7 +988,7 @@ PHP_FUNCTION(stream_context_set_option)

if (options) {
/* handle the array syntax */
RETVAL_BOOL(parse_context_options(context, options) == SUCCESS);
RETVAL_BOOL(parse_context_options(context, options TSRMLS_CC) == SUCCESS);
} else {
php_stream_context_set_option(context, wrappername, optionname, zvalue);
RETVAL_TRUE;
Expand All @@ -1013,7 +1013,7 @@ PHP_FUNCTION(stream_context_set_params)
RETURN_FALSE;
}

RETVAL_BOOL(parse_context_params(context, params) == SUCCESS);
RETVAL_BOOL(parse_context_params(context, params TSRMLS_CC) == SUCCESS);
}
/* }}} */

Expand All @@ -1034,7 +1034,7 @@ PHP_FUNCTION(stream_context_get_default)
context = FG(default_context);

if (params) {
parse_context_options(context, params);
parse_context_options(context, params TSRMLS_CC);
}

php_stream_context_to_zval(context, return_value);
Expand All @@ -1055,7 +1055,7 @@ PHP_FUNCTION(stream_context_create)
context = php_stream_context_alloc();

if (params) {
parse_context_options(context, params);
parse_context_options(context, params TSRMLS_CC);
}

php_stream_context_to_zval(context, return_value);
Expand Down

0 comments on commit eb5afe0

Please sign in to comment.