From 20ff7a2d684e8210f999912ebc0a2c64c8b842db Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Sun, 27 Oct 2013 11:05:40 +0100 Subject: [PATCH] some strtol replacements --- Zend/zend_ini.c | 4 ++-- Zend/zend_operators.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index 3afb67b2f3..73fac48e2d 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -352,9 +352,9 @@ ZEND_API long zend_ini_long(char *name, zend_str_size_uint name_length, int orig if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry) == SUCCESS) { if (orig && ini_entry->modified) { - return (ini_entry->orig_value ? strtol(ini_entry->orig_value, NULL, 0) : 0); + return (ini_entry->orig_value ? ZEND_STRTOL(ini_entry->orig_value, NULL, 0) : 0); } else { - return (ini_entry->value ? strtol(ini_entry->value, NULL, 0) : 0); + return (ini_entry->value ? ZEND_STRTOL(ini_entry->value, NULL, 0) : 0); } } diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 0fd8cafa6c..f2388930c0 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -86,7 +86,7 @@ ZEND_API int zend_atoi(const char *str, zend_str_size_int str_len) /* {{{ */ if (!str_len) { str_len = strlen(str); } - retval = strtol(str, NULL, 0); + retval = ZEND_STRTOL(str, NULL, 0); if (str_len>0) { switch (str[str_len-1]) { case 'g': @@ -263,7 +263,7 @@ ZEND_API void convert_scalar_to_number(zval *op TSRMLS_DC) /* {{{ */ Z_LVAL(holder) = zend_dval_to_lval(Z_DVAL_P(op)); \ break; \ case IS_STRING: \ - Z_LVAL(holder) = strtol(Z_STRVAL_P(op), NULL, 10); \ + Z_LVAL(holder) = ZEND_STRTOL(Z_STRVAL_P(op), NULL, 10); \ break; \ case IS_ARRAY: \ Z_LVAL(holder) = (zend_hash_num_elements(Z_ARRVAL_P(op))?1:0); \ @@ -390,7 +390,7 @@ ZEND_API void convert_to_long_base(zval *op, int base) /* {{{ */ { char *strval = Z_STRVAL_P(op); - Z_LVAL_P(op) = strtol(strval, NULL, base); + Z_LVAL_P(op) = ZEND_STRTOL(strval, NULL, base); str_efree(strval); } break;