com php-src: more fixes to streams: main/streams/filter.c main/streams/memory.c main/streams/streams.c

From: Date: Wed, 16 Oct 2013 09:34:31 +0000
Subject: com php-src: more fixes to streams: main/streams/filter.c main/streams/memory.c main/streams/streams.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-73509@lists.php.net to get a copy of this message
Commit: 0e3420bf8f9152050df81d30f1bbc4af14512d58 Author: Anatol Belski <ab@php.net> Wed, 17 Jul 2013 06:30:28 -0700 Parents: 0020a89c432bc92eca919706fb0755a13803f4ca Branches: str_size_and_int64 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0e3420bf8f9152050df81d30f1bbc4af14512d58 Log: more fixes to streams Changed paths: M main/streams/filter.c M main/streams/memory.c M main/streams/streams.c Diff: diff --git a/main/streams/filter.c b/main/streams/filter.c index 6de3a92..6f3351a 100644 --- a/main/streams/filter.c +++ b/main/streams/filter.c @@ -254,7 +254,7 @@ PHPAPI php_stream_filter *php_stream_filter_create(const char *filtername, zval HashTable *filter_hash = (FG(stream_filters) ? FG(stream_filters) : &stream_filters_hash); php_stream_filter_factory *factory = NULL; php_stream_filter *filter = NULL; - int n; + zend_str_size_int n; char *period; n = strlen(filtername); diff --git a/main/streams/memory.c b/main/streams/memory.c index 90780ea..ac6e1ee 100644 --- a/main/streams/memory.c +++ b/main/streams/memory.c @@ -608,7 +608,8 @@ static php_stream * php_stream_url_wrap_rfc2397(php_stream_wrapper *wrapper, con size_t mlen, dlen, plen, vlen; off_t newoffs; zval *meta = NULL; - int base64 = 0, ilen; + int base64 = 0; + zend_str_size_int ilen; if (memcmp(path, "data:", 5)) { return NULL; diff --git a/main/streams/streams.c b/main/streams/streams.c index d74f9fd..36d55fe 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -805,7 +805,7 @@ PHPAPI int _php_stream_getc(php_stream *stream TSRMLS_DC) PHPAPI int _php_stream_puts(php_stream *stream, const char *buf TSRMLS_DC) { - int len; + zend_str_size_int len; char newline[2] = "\n"; /* is this OK for Win? */ len = strlen(buf); @@ -1387,7 +1387,7 @@ PHPAPI size_t _php_stream_passthru(php_stream * stream STREAMS_DC TSRMLS_DC) { size_t bcount = 0; char buf[8192]; - int b; + zend_str_size_int b; if (php_stream_mmap_possible(stream)) { char *p; @@ -1676,9 +1676,9 @@ int php_shutdown_stream_wrappers(int module_number TSRMLS_DC) /* Validate protocol scheme names during registration * Must conform to /^[a-zA-Z0-9+.-]+$/ */ -static inline int php_stream_wrapper_scheme_validate(const char *protocol, unsigned int protocol_len) +static inline int php_stream_wrapper_scheme_validate(const char *protocol, zend_str_size_int protocol_len) { - unsigned int i; + zend_str_size_int i; for(i = 0; i < protocol_len; i++) { if (!isalnum((int)protocol[i]) && @@ -1695,7 +1695,7 @@ static inline int php_stream_wrapper_scheme_validate(const char *protocol, unsig /* API for registering GLOBAL wrappers */ PHPAPI int php_register_url_stream_wrapper(const char *protocol, php_stream_wrapper *wrapper TSRMLS_DC) { - unsigned int protocol_len = strlen(protocol); + zend_str_size_uint protocol_len = strlen(protocol); if (php_stream_wrapper_scheme_validate(protocol, protocol_len) == FAILURE) { return FAILURE; @@ -1721,7 +1721,7 @@ static void clone_wrapper_hash(TSRMLS_D) /* API for registering VOLATILE wrappers */ PHPAPI int php_register_url_stream_wrapper_volatile(const char *protocol, php_stream_wrapper *wrapper TSRMLS_DC) { - unsigned int protocol_len = strlen(protocol); + zend_str_size_uint protocol_len = strlen(protocol); if (php_stream_wrapper_scheme_validate(protocol, protocol_len) == FAILURE) { return FAILURE;

« previous php.cvs (#73509) next »