From 40bcd909d8948c53226accf9ceb11987b0f8e442 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Wed, 2 Jul 2014 12:22:14 +0200 Subject: refactor php_stream_temp_create{,_ex} and use it for the php://input stream --- main/php_memory_streams.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'main/php_memory_streams.h') 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() -- cgit v1.2.1