com php-src: backported remaining part in main/streams: main/streams/php_stream_context.h main/streams/streams .c main/streams/transports.c
main/streams/userspace.c

From: Date: Sat, 15 Feb 2014 20:01:06 +0000
Subject: com php-src: backported remaining part in main/streams: main/streams/php_stream_context.h main/streams/streams .c main/streams/transports.c
main/streams/userspace.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-76075@lists.php.net to get a copy of this message
Commit: a005010ef6ce1a3fe27641fd3e1081344c25ca64 Author: Anatol Belski <ab@php.net> Sat, 15 Feb 2014 21:01:06 +0100 Parents: 4fc459e4240a506da3a617381e8c0a942b262da9 Branches: str_size_and_int64_56_backport Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a005010ef6ce1a3fe27641fd3e1081344c25ca64 Log: backported remaining part in main/streams Changed paths: M main/streams/php_stream_context.h M main/streams/streams.c M main/streams/transports.c M main/streams/userspace.c Diff: diff --git a/main/streams/php_stream_context.h b/main/streams/php_stream_context.h index 5c6925a..58b298b 100644 --- a/main/streams/php_stream_context.h +++ b/main/streams/php_stream_context.h @@ -87,7 +87,7 @@ END_EXTERN_C() BEGIN_EXTERN_C() PHPAPI void php_stream_notification_notify(php_stream_context *context, int notifycode, int severity, char *xmsg, int xcode, size_t bytes_sofar, size_t bytes_max, void * ptr TSRMLS_DC); -PHPAPI php_stream_context *php_stream_context_set(php_stream *stream, php_stream_context *context TSRMLS_DC); +PHPAPI php_stream_context *php_stream_context_set(php_stream *stream, php_stream_context *context); END_EXTERN_C() #define php_stream_notify_info(context, code, xmsg, xcode) do { if ((context) && (context)->notifier) { \ diff --git a/main/streams/streams.c b/main/streams/streams.c index 93b2b32..e754b0d 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -2148,9 +2148,10 @@ PHPAPI php_stream *_php_stream_open_wrapper_ex(const char *path, const char *mod /* }}} */ /* {{{ context API */ -PHPAPI php_stream_context *php_stream_context_set(php_stream *stream, php_stream_context *context TSRMLS_DC) +PHPAPI php_stream_context *php_stream_context_set(php_stream *stream, php_stream_context *context) { php_stream_context *oldcontext = stream->context; + TSRMLS_FETCH(); stream->context = context; diff --git a/main/streams/transports.c b/main/streams/transports.c index 4c3ded7..c9e3a19 100644 --- a/main/streams/transports.c +++ b/main/streams/transports.c @@ -134,7 +134,7 @@ PHPAPI php_stream *_php_stream_xport_create(const char *name, size_t namelen, in context STREAMS_REL_CC TSRMLS_CC); if (stream) { - php_stream_context_set(stream, context TSRMLS_CC); + php_stream_context_set(stream, context); if ((flags & STREAM_XPORT_SERVER) == 0) { /* client */ diff --git a/main/streams/userspace.c b/main/streams/userspace.c index 82a4f81..533587d 100644 --- a/main/streams/userspace.c +++ b/main/streams/userspace.c @@ -1121,7 +1121,7 @@ static int php_userstreamop_set_option(php_stream *stream, int option, int value php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s::" USERSTREAM_SET_OPTION " is not implemented!", us->wrapper->classname); ret = PHP_STREAM_OPTION_RETURN_ERR; - } else if (retval && zend_is_true(retval TSRMLS_CC)) { + } else if (retval && zend_is_true(retval)) { ret = PHP_STREAM_OPTION_RETURN_OK; } else { ret = PHP_STREAM_OPTION_RETURN_ERR; @@ -1629,7 +1629,7 @@ static int php_userstreamop_cast(php_stream *stream, int castas, void **retptr T us->wrapper->classname); break; } - if (retval == NULL || !zend_is_true(retval TSRMLS_CC)) { + if (retval == NULL || !zend_is_true(retval)) { break; } php_stream_from_zval_no_verify(intstream, &retval);

« previous php.cvs (#76075) next »