summaryrefslogtreecommitdiff
path: root/main/php_streams.h
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2003-02-27 19:10:24 +0000
committerWez Furlong <wez@php.net>2003-02-27 19:10:24 +0000
commitcfd8150b309930dfa658f0ae136de63598ed0e11 (patch)
tree6ce2b38f35ee53fdb4a4fbee46ccac0cb5677a25 /main/php_streams.h
parentab1793290eefa5d1364466ced0365a3d8effee87 (diff)
downloadphp-git-cfd8150b309930dfa658f0ae136de63598ed0e11.tar.gz
Add a generic meta data api for streams.
Diffstat (limited to 'main/php_streams.h')
-rwxr-xr-xmain/php_streams.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/php_streams.h b/main/php_streams.h
index 008bcdb1a4..e449dc38d8 100755
--- a/main/php_streams.h
+++ b/main/php_streams.h
@@ -349,6 +349,9 @@ PHPAPI int _php_stream_set_option(php_stream *stream, int option, int value, voi
PHPAPI int _php_stream_truncate_set_size(php_stream *stream, size_t newsize TSRMLS_DC);
#define php_stream_truncate_set_size(stream, size) _php_stream_truncate_set_size((stream), (size) TSRMLS_CC)
+#define PHP_STREAM_OPTION_META_DATA_API 11 /* ptrparam is a zval* to which to add meta data information */
+#define php_stream_populate_meta_data(stream, zv) (_php_stream_set_option((stream), PHP_STREAM_OPTION_META_DATA_API, 0, zv TSRMLS_CC) == PHP_STREAM_OPTION_RETURN_OK ? 1 : 0)
+
#define PHP_STREAM_OPTION_RETURN_OK 0 /* option set OK */
#define PHP_STREAM_OPTION_RETURN_ERR -1 /* problem setting option */
#define PHP_STREAM_OPTION_RETURN_NOTIMPL -2 /* underlying stream does not implement; streams can handle it instead */