diff options
| author | Andrey Hristov <andrey@php.net> | 2013-07-30 12:49:36 +0200 |
|---|---|---|
| committer | Andrey Hristov <andrey@php.net> | 2013-07-30 12:49:36 +0200 |
| commit | 92d27ccb0574f901a107409a7fec92888fa2b82f (patch) | |
| tree | ffc98232c24bc4d6306bd7cb98d06e0320287910 /main/streams/memory.c | |
| parent | 5e1ac558c3354f98a9a5aecb5b518c46cd55357a (diff) | |
| download | php-git-92d27ccb0574f901a107409a7fec92888fa2b82f.tar.gz | |
Constify streams API and a few other calls down the rabbit hole.
(`char *` to `const char *` for parameters and few return values)
In a few places int len moved to size_t len.
Diffstat (limited to 'main/streams/memory.c')
| -rw-r--r-- | main/streams/memory.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/main/streams/memory.c b/main/streams/memory.c index 328d3be399..90780ea78f 100644 --- a/main/streams/memory.c +++ b/main/streams/memory.c @@ -598,7 +598,9 @@ PHPAPI php_stream_ops php_stream_rfc2397_ops = { php_stream_temp_set_option }; -static php_stream * php_stream_url_wrap_rfc2397(php_stream_wrapper *wrapper, char *path, char *mode, int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC) /* {{{ */ +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 *stream; php_stream_temp_data *ts; @@ -640,11 +642,11 @@ static php_stream * php_stream_url_wrap_rfc2397(php_stream_wrapper *wrapper, cha MAKE_STD_ZVAL(meta); array_init(meta); if (!semi) { /* there is only a mime type */ - add_assoc_stringl(meta, "mediatype", path, mlen, 1); + add_assoc_stringl(meta, "mediatype", (char *) path, mlen, 1); mlen = 0; } else if (sep && sep < semi) { /* there is a mime type */ plen = semi - path; - add_assoc_stringl(meta, "mediatype", path, plen, 1); + add_assoc_stringl(meta, "mediatype", (char *) path, plen, 1); mlen -= plen; 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 */ |
