diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-02-10 10:04:30 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-02-10 10:04:30 +0400 |
commit | f4cfaf36e23ca47da3e352e1c60909104c059647 (patch) | |
tree | 0db3e2a323b12c5bbf1a958c857f92eb58c240d1 /main/streams/php_stream_context.h | |
parent | 89a9acea1f9d821a9805b3857bf4febbba08690d (diff) | |
download | php-git-f4cfaf36e23ca47da3e352e1c60909104c059647.tar.gz |
Use better data structures (incomplete)
Diffstat (limited to 'main/streams/php_stream_context.h')
-rw-r--r-- | main/streams/php_stream_context.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/main/streams/php_stream_context.h b/main/streams/php_stream_context.h index 5c6925a856..2c0a33aab7 100644 --- a/main/streams/php_stream_context.h +++ b/main/streams/php_stream_context.h @@ -38,7 +38,7 @@ typedef void (*php_stream_notification_func)(php_stream_context *context, FG(default_context) ? FG(default_context) : \ (FG(default_context) = php_stream_context_alloc(TSRMLS_C)) ) -#define php_stream_context_to_zval(context, zval) { ZVAL_RESOURCE(zval, (context)->rsrc_id); zend_list_addref((context)->rsrc_id); } +#define php_stream_context_to_zval(context, zval) { ZVAL_RESOURCE(zval, (context)->res); zend_list_addref((context)->res); } typedef struct _php_stream_notifier php_stream_notifier; @@ -52,15 +52,15 @@ struct _php_stream_notifier { struct _php_stream_context { php_stream_notifier *notifier; - zval *options; /* hash keyed by wrapper family or specific wrapper */ - int rsrc_id; /* used for auto-cleanup */ + zval options; /* hash keyed by wrapper family or specific wrapper */ + zend_resource *res; /* used for auto-cleanup */ }; BEGIN_EXTERN_C() PHPAPI void php_stream_context_free(php_stream_context *context); PHPAPI php_stream_context *php_stream_context_alloc(TSRMLS_D); -PHPAPI int php_stream_context_get_option(php_stream_context *context, - const char *wrappername, const char *optionname, zval ***optionvalue); +PHPAPI zval *php_stream_context_get_option(php_stream_context *context, + const char *wrappername, const char *optionname); PHPAPI int php_stream_context_set_option(php_stream_context *context, const char *wrappername, const char *optionname, zval *optionvalue); |