summaryrefslogtreecommitdiff
path: root/main/php_memory_streams.h
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2002-03-23 17:51:20 +0000
committerMarcus Boerger <helly@php.net>2002-03-23 17:51:20 +0000
commit4df6833a79cf209022acacd2dc0d26e63124659a (patch)
treec5033eb0917de7dd41fb0d4bbdd377c6042d1848 /main/php_memory_streams.h
parent1cf543c34ad3cf44163369218a82dc238a41a511 (diff)
downloadphp-git-4df6833a79cf209022acacd2dc0d26e63124659a.tar.gz
-defined php_stream_temp_new() for standard temp streams
Diffstat (limited to 'main/php_memory_streams.h')
-rw-r--r--main/php_memory_streams.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/main/php_memory_streams.h b/main/php_memory_streams.h
index 11c63be622..58b302bf5a 100644
--- a/main/php_memory_streams.h
+++ b/main/php_memory_streams.h
@@ -21,11 +21,17 @@
#include "php_streams.h"
+#define PHP_STREAM_MAX_MEM 2 * 1024 * 1024
+
+#define TEMP_STREAM_DEFAULT 0
+#define TEMP_STREAM_READONLY 1
+
#define php_stream_memory_create(mode) _php_stream_memory_create((mode) STREAMS_CC TSRMLS_CC)
#define php_stream_memory_create_rel(mode) _php_stream_memory_create((mode) STREAMS_REL_CC TSRMLS_CC)
#define php_stream_memory_open(mode, buf, length) _php_stream_memory_open((mode), (buf), (length) STREAMS_CC TSRMLS_CC)
#define php_stream_memory_get_buffer(stream, length) _php_stream_memory_get_buffer((stream), (length) STREAMS_CC TSRMLS_CC)
+#define php_stream_temp_new() php_stream_temp_create(TEMP_STREAM_DEFAULT, PHP_STREAM_MAX_MEM)
#define php_stream_temp_create(mode, max_memory_usage) _php_stream_temp_create((mode), (max_memory_usage) STREAMS_CC TSRMLS_CC)
#define php_stream_temp_create_rel(mode, max_memory_usage) _php_stream_temp_create((mode), (max_memory_usage) STREAMS_REL_CC TSRMLS_CC)
#define php_stream_temp_open(mode, max_memory_usage, buf, length) _php_stream_temp_open((mode), (max_memory_usage), (buf), (length) STREAMS_CC TSRMLS_CC)
@@ -38,9 +44,6 @@ PHPAPI char *_php_stream_memory_get_buffer(php_stream *stream, size_t *length ST
PHPAPI php_stream *_php_stream_temp_create(int mode, size_t max_memory_usage STREAMS_DC TSRMLS_DC);
PHPAPI php_stream *_php_stream_temp_open(int mode, size_t max_memory_usage, char *buf, size_t length STREAMS_DC TSRMLS_DC);
-#define TEMP_STREAM_DEFAULT 0
-#define TEMP_STREAM_READONLY 1
-
extern php_stream_ops php_stream_memory_ops;
extern php_stream_ops php_stream_temp_ops;