com php-src: fix length data types: Zend/zend_exceptions.c Zend/zend_exceptions.h
| From: | Anatol Belski | Date: | Fri, 19 Sep 2014 10:14:46 +0000 |
| Subject: | com php-src: fix length data types: Zend/zend_exceptions.c Zend/zend_exceptions.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-81756@lists.php.net to get a copy of this message | ||
Commit: babcad063f3042d5fb374b5013c5c742407c1bd2
Author: Anatol Belski <ab@php.net> Fri, 19 Sep 2014 12:14:46 +0200
Parents: ede6eca2b2f927ee7d42fbe36885fdabc621b692
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=babcad063f3042d5fb374b5013c5c742407c1bd2
Log:
fix length data types
Changed paths:
M Zend/zend_exceptions.c
M Zend/zend_exceptions.h
Diff:
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index c5193ce...9a270c0 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -362,7 +362,7 @@ ZEND_METHOD(error_exception, getSeverity)
#define TRACE_ARG_APPEND(vallen) do { \
- int len = str->len; \
+ size_t len = str->len; \
str = zend_string_realloc(str, len + vallen, 0); \
memmove(str->val + len - l_added + 1 + vallen, str->val + len - l_added + 1, l_added); \
} while (0)
@@ -620,10 +620,10 @@ ZEND_METHOD(exception, getPrevious)
RETURN_ZVAL(previous, 1, 0);
} /* }}} */
-int zend_spprintf(char **message, int max_len, const char *format, ...) /* {{{ */
+size_t zend_spprintf(char **message, size_t max_len, const char *format, ...) /* {{{ */
{
va_list arg;
- int len;
+ size_t len;
va_start(arg, format);
len = zend_vspprintf(message, max_len, format, arg);
@@ -632,7 +632,7 @@ int zend_spprintf(char **message, int max_len, const char *format, ...) /* {{{ *
}
/* }}} */
-zend_string *zend_strpprintf(int max_len, const char *format, ...) /* {{{ */
+zend_string *zend_strpprintf(size_t max_len, const char *format, ...) /* {{{ */
{
va_list arg;
zend_string *str;
diff --git a/Zend/zend_exceptions.h b/Zend/zend_exceptions.h
index 0c13b66..5aa6544 100644
--- a/Zend/zend_exceptions.h
+++ b/Zend/zend_exceptions.h
@@ -53,8 +53,8 @@ extern ZEND_API void (*zend_throw_exception_hook)(zval *ex TSRMLS_DC);
ZEND_API void zend_exception_error(zend_object *exception, int severity TSRMLS_DC);
/* do not export, in php it's available thru spprintf directly */
-int zend_spprintf(char **message, int max_len, const char *format, ...);
-zend_string *zend_strpprintf(int max_len, const char *format, ...);
+size_t zend_spprintf(char **message, size_t max_len, const char *format, ...);
+zend_string *zend_strpprintf(size_t max_len, const char *format, ...);
END_EXTERN_C()