diff options
author | Anatol Belski <ab@php.net> | 2014-12-13 23:06:14 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-12-13 23:06:14 +0100 |
commit | bdeb220f48825642f84cdbf3ff23a30613c92e86 (patch) | |
tree | 1a6cf34d20420e4815b4becb21311a4457d84103 /main/streams/memory.c | |
parent | bb66f385d09e7e55390e9f57fcbca08f6b43ff91 (diff) | |
download | php-git-bdeb220f48825642f84cdbf3ff23a30613c92e86.tar.gz |
first shot remove TSRMLS_* things
Diffstat (limited to 'main/streams/memory.c')
-rw-r--r-- | main/streams/memory.c | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/main/streams/memory.c b/main/streams/memory.c index 28274d7fcd..b2dca2115c 100644 --- a/main/streams/memory.c +++ b/main/streams/memory.c @@ -46,7 +46,7 @@ typedef struct { /* {{{ */ -static size_t php_stream_memory_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC) +static size_t php_stream_memory_write(php_stream *stream, const char *buf, size_t count) { php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; assert(ms != NULL); @@ -82,7 +82,7 @@ static size_t php_stream_memory_write(php_stream *stream, const char *buf, size_ /* {{{ */ -static size_t php_stream_memory_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) +static size_t php_stream_memory_read(php_stream *stream, char *buf, size_t count) { php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; assert(ms != NULL); @@ -107,7 +107,7 @@ static size_t php_stream_memory_read(php_stream *stream, char *buf, size_t count /* {{{ */ -static int php_stream_memory_close(php_stream *stream, int close_handle TSRMLS_DC) +static int php_stream_memory_close(php_stream *stream, int close_handle) { php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; assert(ms != NULL); @@ -122,7 +122,7 @@ static int php_stream_memory_close(php_stream *stream, int close_handle TSRMLS_D /* {{{ */ -static int php_stream_memory_flush(php_stream *stream TSRMLS_DC) +static int php_stream_memory_flush(php_stream *stream) { /* nothing to do here */ return 0; @@ -131,7 +131,7 @@ static int php_stream_memory_flush(php_stream *stream TSRMLS_DC) /* {{{ */ -static int php_stream_memory_seek(php_stream *stream, zend_off_t offset, int whence, zend_off_t *newoffs TSRMLS_DC) +static int php_stream_memory_seek(php_stream *stream, zend_off_t offset, int whence, zend_off_t *newoffs) { php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; assert(ms != NULL); @@ -195,13 +195,13 @@ static int php_stream_memory_seek(php_stream *stream, zend_off_t offset, int whe /* }}} */ /* {{{ */ -static int php_stream_memory_cast(php_stream *stream, int castas, void **ret TSRMLS_DC) +static int php_stream_memory_cast(php_stream *stream, int castas, void **ret) { return FAILURE; } /* }}} */ -static int php_stream_memory_stat(php_stream *stream, php_stream_statbuf *ssb TSRMLS_DC) /* {{{ */ +static int php_stream_memory_stat(php_stream *stream, php_stream_statbuf *ssb) /* {{{ */ { time_t timestamp = 0; php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; @@ -244,7 +244,7 @@ static int php_stream_memory_stat(php_stream *stream, php_stream_statbuf *ssb TS } /* }}} */ -static int php_stream_memory_set_option(php_stream *stream, int option, int value, void *ptrparam TSRMLS_DC) /* {{{ */ +static int php_stream_memory_set_option(php_stream *stream, int option, int value, void *ptrparam) /* {{{ */ { php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; size_t newsize; @@ -290,7 +290,7 @@ PHPAPI php_stream_ops php_stream_memory_ops = { /* {{{ */ -PHPAPI php_stream *_php_stream_memory_create(int mode STREAMS_DC TSRMLS_DC) +PHPAPI php_stream *_php_stream_memory_create(int mode STREAMS_DC) { php_stream_memory_data *self; php_stream *stream; @@ -310,7 +310,7 @@ PHPAPI php_stream *_php_stream_memory_create(int mode STREAMS_DC TSRMLS_DC) /* {{{ */ -PHPAPI php_stream *_php_stream_memory_open(int mode, char *buf, size_t length STREAMS_DC TSRMLS_DC) +PHPAPI php_stream *_php_stream_memory_open(int mode, char *buf, size_t length STREAMS_DC) { php_stream *stream; php_stream_memory_data *ms; @@ -335,7 +335,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 char *_php_stream_memory_get_buffer(php_stream *stream, size_t *length STREAMS_DC) { php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; @@ -361,7 +361,7 @@ typedef struct { /* {{{ */ -static size_t php_stream_temp_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC) +static size_t php_stream_temp_write(php_stream *stream, const char *buf, size_t count) { php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; assert(ts != NULL); @@ -387,7 +387,7 @@ static size_t php_stream_temp_write(php_stream *stream, const char *buf, size_t /* {{{ */ -static size_t php_stream_temp_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) +static size_t php_stream_temp_read(php_stream *stream, char *buf, size_t count) { php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; size_t got; @@ -408,7 +408,7 @@ static size_t php_stream_temp_read(php_stream *stream, char *buf, size_t count T /* {{{ */ -static int php_stream_temp_close(php_stream *stream, int close_handle TSRMLS_DC) +static int php_stream_temp_close(php_stream *stream, int close_handle) { php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; int ret; @@ -435,7 +435,7 @@ static int php_stream_temp_close(php_stream *stream, int close_handle TSRMLS_DC) /* {{{ */ -static int php_stream_temp_flush(php_stream *stream TSRMLS_DC) +static int php_stream_temp_flush(php_stream *stream) { php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; assert(ts != NULL); @@ -446,7 +446,7 @@ static int php_stream_temp_flush(php_stream *stream TSRMLS_DC) /* {{{ */ -static int php_stream_temp_seek(php_stream *stream, zend_off_t offset, int whence, zend_off_t *newoffs TSRMLS_DC) +static int php_stream_temp_seek(php_stream *stream, zend_off_t offset, int whence, zend_off_t *newoffs) { php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; int ret; @@ -466,7 +466,7 @@ static int php_stream_temp_seek(php_stream *stream, zend_off_t offset, int whenc /* }}} */ /* {{{ */ -static int php_stream_temp_cast(php_stream *stream, int castas, void **ret TSRMLS_DC) +static int php_stream_temp_cast(php_stream *stream, int castas, void **ret) { php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; php_stream *file; @@ -512,7 +512,7 @@ static int php_stream_temp_cast(php_stream *stream, int castas, void **ret TSRML } /* }}} */ -static int php_stream_temp_stat(php_stream *stream, php_stream_statbuf *ssb TSRMLS_DC) /* {{{ */ +static int php_stream_temp_stat(php_stream *stream, php_stream_statbuf *ssb) /* {{{ */ { php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; @@ -523,7 +523,7 @@ static int php_stream_temp_stat(php_stream *stream, php_stream_statbuf *ssb TSRM } /* }}} */ -static int php_stream_temp_set_option(php_stream *stream, int option, int value, void *ptrparam TSRMLS_DC) /* {{{ */ +static int php_stream_temp_set_option(php_stream *stream, int option, int value, void *ptrparam) /* {{{ */ { php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; @@ -555,7 +555,7 @@ PHPAPI php_stream_ops php_stream_temp_ops = { /* }}} */ /* {{{ _php_stream_temp_create_ex */ -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_create_ex(int mode, size_t max_memory_usage, const char *tmpdir STREAMS_DC) { php_stream_temp_data *self; php_stream *stream; @@ -577,14 +577,14 @@ PHPAPI php_stream *_php_stream_temp_create_ex(int mode, size_t max_memory_usage, /* }}} */ /* {{{ _php_stream_temp_create */ -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(int mode, size_t max_memory_usage STREAMS_DC) { return php_stream_temp_create_ex(mode, max_memory_usage, NULL); } /* }}} */ /* {{{ _php_stream_temp_open */ -PHPAPI php_stream *_php_stream_temp_open(int mode, size_t max_memory_usage, char *buf, size_t length 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) { php_stream *stream; php_stream_temp_data *ts; @@ -593,8 +593,8 @@ PHPAPI php_stream *_php_stream_temp_open(int mode, size_t max_memory_usage, char if ((stream = php_stream_temp_create_rel(mode, max_memory_usage)) != NULL) { if (length) { assert(buf != NULL); - php_stream_temp_write(stream, buf, length TSRMLS_CC); - php_stream_temp_seek(stream, 0, SEEK_SET, &newoffs TSRMLS_CC); + php_stream_temp_write(stream, buf, length); + php_stream_temp_seek(stream, 0, SEEK_SET, &newoffs); } ts = (php_stream_temp_data*)stream->abstract; assert(ts != NULL); @@ -616,7 +616,7 @@ PHPAPI php_stream_ops php_stream_rfc2397_ops = { static php_stream * php_stream_url_wrap_rfc2397(php_stream_wrapper *wrapper, const char *path, const char *mode, int options, char **opened_path, - php_stream_context *context STREAMS_DC TSRMLS_DC) /* {{{ */ + php_stream_context *context STREAMS_DC) /* {{{ */ { php_stream *stream; php_stream_temp_data *ts; @@ -641,7 +641,7 @@ static php_stream * php_stream_url_wrap_rfc2397(php_stream_wrapper *wrapper, con } if ((comma = memchr(path, ',', dlen)) == NULL) { - php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "rfc2397: no comma in URL"); + php_stream_wrapper_log_error(wrapper, options, "rfc2397: no comma in URL"); return NULL; } @@ -653,7 +653,7 @@ static php_stream * php_stream_url_wrap_rfc2397(php_stream_wrapper *wrapper, con sep = memchr(path, '/', mlen); if (!semi && !sep) { - php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "rfc2397: illegal media type"); + php_stream_wrapper_log_error(wrapper, options, "rfc2397: illegal media type"); return NULL; } @@ -668,7 +668,7 @@ static php_stream * php_stream_url_wrap_rfc2397(php_stream_wrapper *wrapper, con path += plen; } else if (semi != path || mlen != sizeof(";base64")-1 || memcmp(path, ";base64", sizeof(";base64")-1)) { /* must be error since parameters are only allowed after mediatype */ zval_ptr_dtor(&meta); - php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "rfc2397: illegal media type"); + php_stream_wrapper_log_error(wrapper, options, "rfc2397: illegal media type"); return NULL; } /* get parameters and potentially ';base64' */ @@ -681,7 +681,7 @@ static php_stream * php_stream_url_wrap_rfc2397(php_stream_wrapper *wrapper, con if (mlen != sizeof("base64")-1 || memcmp(path, "base64", sizeof("base64")-1)) { /* must be error since parameters are only allowed after mediatype and we have no '=' sign */ zval_ptr_dtor(&meta); - php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "rfc2397: illegal parameter"); + php_stream_wrapper_log_error(wrapper, options, "rfc2397: illegal parameter"); return NULL; } base64 = 1; @@ -701,7 +701,7 @@ static php_stream * php_stream_url_wrap_rfc2397(php_stream_wrapper *wrapper, con } if (mlen) { zval_ptr_dtor(&meta); - php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "rfc2397: illegal URL"); + php_stream_wrapper_log_error(wrapper, options, "rfc2397: illegal URL"); return NULL; } } else { @@ -717,7 +717,7 @@ static php_stream * php_stream_url_wrap_rfc2397(php_stream_wrapper *wrapper, con base64_comma = php_base64_decode((const unsigned char *)comma, dlen); if (!base64_comma) { zval_ptr_dtor(&meta); - php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "rfc2397: unable to decode"); + php_stream_wrapper_log_error(wrapper, options, "rfc2397: unable to decode"); return NULL; } comma = base64_comma->val; @@ -730,8 +730,8 @@ static php_stream * php_stream_url_wrap_rfc2397(php_stream_wrapper *wrapper, con if ((stream = php_stream_temp_create_rel(0, ~0u)) != NULL) { /* store data */ - php_stream_temp_write(stream, comma, ilen TSRMLS_CC); - php_stream_temp_seek(stream, 0, SEEK_SET, &newoffs TSRMLS_CC); + php_stream_temp_write(stream, comma, ilen); + php_stream_temp_seek(stream, 0, SEEK_SET, &newoffs); /* set special stream stuff (enforce exact mode) */ vlen = strlen(mode); if (vlen >= sizeof(stream->mode)) { |