diff options
author | Anatol Belski <ab@php.net> | 2014-10-22 09:25:53 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-10-22 17:56:19 +0200 |
commit | 944d2c65e1e8da7e6aa4c960e9d616ecda1b67c6 (patch) | |
tree | 5d8cb82b82fc9688884fbf4ff05e5afb554eea97 /Zend | |
parent | f37b4cdb8f9d8b2ccddb1b206bd744180b723d19 (diff) | |
download | php-git-944d2c65e1e8da7e6aa4c960e9d616ecda1b67c6.tar.gz |
fix datatype mismatches
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/zend.c | 12 | ||||
-rw-r--r-- | Zend/zend.h | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/Zend/zend.c b/Zend/zend.c index d5a933b47c..f429b2d2a4 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -223,13 +223,13 @@ ZEND_API int zend_make_printable_zval(zval *expr, zval *expr_copy TSRMLS_DC) /* } /* }}} */ -ZEND_API int zend_print_zval(zval *expr, int indent TSRMLS_DC) /* {{{ */ +ZEND_API size_t zend_print_zval(zval *expr, int indent TSRMLS_DC) /* {{{ */ { return zend_print_zval_ex(zend_write, expr, indent TSRMLS_CC); } /* }}} */ -ZEND_API int zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int indent TSRMLS_DC) /* {{{ */ +ZEND_API size_t zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int indent TSRMLS_DC) /* {{{ */ { zend_string *str = zval_get_string(expr); size_t len = str->len; @@ -793,7 +793,7 @@ void zend_shutdown(TSRMLS_D) /* {{{ */ void zend_set_utility_values(zend_utility_values *utility_values) /* {{{ */ { zend_uv = *utility_values; - zend_uv.import_use_extension_length = strlen(zend_uv.import_use_extension); + zend_uv.import_use_extension_length = (uint)strlen(zend_uv.import_use_extension); } /* }}} */ @@ -827,11 +827,11 @@ ZEND_API void zend_append_version_info(const zend_extension *extension) /* {{{ * char *new_info; uint new_info_length; - new_info_length = sizeof(" with v, , by \n") + new_info_length = (uint)(sizeof(" with v, , by \n") + strlen(extension->name) + strlen(extension->version) + strlen(extension->copyright) - + strlen(extension->author); + + strlen(extension->author)); new_info = (char *) malloc(new_info_length + 1); @@ -1097,7 +1097,7 @@ static void zend_error_va_list(int type, const char *format, va_list args) # endif #endif va_copy(usr_copy, args); - len = zend_vspprintf(&str, 0, format, usr_copy); + len = (int)zend_vspprintf(&str, 0, format, usr_copy); ZVAL_NEW_STR(¶ms[1], zend_string_init(str, len, 0)); efree(str); #ifdef va_copy diff --git a/Zend/zend.h b/Zend/zend.h index 969fa5e71b..b5de33fb43 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -197,7 +197,7 @@ typedef struct _zend_utility_values { zend_bool html_errors; } zend_utility_values; -typedef int (*zend_write_func_t)(const char *str, uint str_length); +typedef int (*zend_write_func_t)(const char *str, size_t str_length); #define zend_bailout() _zend_bailout(__FILE__, __LINE__) @@ -228,8 +228,8 @@ ZEND_API void _zend_bailout(char *filename, uint lineno); ZEND_API char *get_zend_version(void); ZEND_API int zend_make_printable_zval(zval *expr, zval *expr_copy TSRMLS_DC); -ZEND_API int zend_print_zval(zval *expr, int indent TSRMLS_DC); -ZEND_API int zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int indent TSRMLS_DC); +ZEND_API size_t zend_print_zval(zval *expr, int indent TSRMLS_DC); +ZEND_API size_t zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int indent TSRMLS_DC); ZEND_API void zend_print_zval_r(zval *expr, int indent TSRMLS_DC); ZEND_API void zend_print_flat_zval_r(zval *expr TSRMLS_DC); ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int indent TSRMLS_DC); |