diff options
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 |