diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-08-07 15:55:37 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-08-07 15:55:37 +0400 |
commit | 417ed16d11d2d7376b1a74028c42cd87818bfffb (patch) | |
tree | 98a9d9001152ff8e24d7407416476b32b2b7612c /main/php_streams.h | |
parent | 414762fc12acef00733121ae515c9aba32e8bce3 (diff) | |
download | php-git-417ed16d11d2d7376b1a74028c42cd87818bfffb.tar.gz |
Make stream->context indirect trough zend_resource (stream->ctx->ptr).
Fixed ext/standard/tests/streams/bug61115.phpt
Diffstat (limited to 'main/php_streams.h')
-rw-r--r-- | main/php_streams.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/php_streams.h b/main/php_streams.h index fac15ce3e4..38215a67b0 100644 --- a/main/php_streams.h +++ b/main/php_streams.h @@ -205,7 +205,7 @@ struct _php_stream { int __exposed; /* non-zero if exposed as a zval somewhere */ char *orig_path; - php_stream_context *context; + zend_resource *ctx; int flags; /* PHP_STREAM_FLAG_XXX */ /* buffer */ @@ -228,6 +228,9 @@ struct _php_stream { struct _php_stream *enclosing_stream; /* this is a private stream owned by enclosing_stream */ }; /* php_stream */ +#define PHP_STREAM_CONTEXT(stream) \ + ((php_stream_context*) ((stream)->ctx ? ((stream)->ctx->ptr) : NULL)) + /* state definitions when closing down; these are private to streams.c */ #define PHP_STREAM_FCLOSE_NONE 0 #define PHP_STREAM_FCLOSE_FDOPEN 1 |