mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
-defined php_stream_temp_new() for standard temp streams
This commit is contained in:
parent
1cf543c34a
commit
4df6833a79
2 changed files with 7 additions and 5 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue