summaryrefslogtreecommitdiff
path: root/main/php_memory_streams.h
diff options
context:
space:
mode:
authorMichael Wallner <mike@php.net>2014-07-02 12:22:14 +0200
committerMichael Wallner <mike@php.net>2014-07-03 20:40:40 +0200
commit40bcd909d8948c53226accf9ceb11987b0f8e442 (patch)
treefb7c08e740899270900f83ce25c5ae3ae8e696b1 /main/php_memory_streams.h
parent11e401ab59b73b22dcd6ce91e250c82ca808cd4f (diff)
downloadphp-git-40bcd909d8948c53226accf9ceb11987b0f8e442.tar.gz
refactor php_stream_temp_create{,_ex} and use it for the php://input stream
Diffstat (limited to 'main/php_memory_streams.h')
-rw-r--r--main/php_memory_streams.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/php_memory_streams.h b/main/php_memory_streams.h
index 3c4c3280eb..32a3dae0df 100644
--- a/main/php_memory_streams.h
+++ b/main/php_memory_streams.h
@@ -35,7 +35,8 @@
#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(mode, max_memory_usage) php_stream_temp_create_ex((mode), (max_memory_usage), NULL)
+#define php_stream_temp_create_ex(mode, max_memory_usage, tmpdir) _php_stream_temp_create_ex((mode), (max_memory_usage), (tmpdir) 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)
@@ -45,6 +46,7 @@ PHPAPI php_stream *_php_stream_memory_open(int mode, char *buf, size_t length ST
PHPAPI char *_php_stream_memory_get_buffer(php_stream *stream, size_t *length STREAMS_DC TSRMLS_DC);
PHPAPI php_stream *_php_stream_temp_create(int mode, size_t max_memory_usage STREAMS_DC TSRMLS_DC);
+PHPAPI php_stream *_php_stream_temp_create_ex(int mode, size_t max_memory_usage, const char *tmpdir 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);
END_EXTERN_C()