com php-src: some strtol replacements: Zend/zend_ini.c Ze nd/zend_operators.c
| From: | Anatol Belski | Date: | Sun, 27 Oct 2013 10:05:40 +0000 |
| Subject: | com php-src: some strtol replacements: Zend/zend_ini.c Ze nd/zend_operators.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-73801@lists.php.net to get a copy of this message | ||
Commit: 20ff7a2d684e8210f999912ebc0a2c64c8b842db
Author: Anatol Belski <ab@php.net> Sun, 27 Oct 2013 11:05:40 +0100
Parents: 23390de0e70a6e9faf0799f1ca6bf227e801308b
Branches: str_size_and_int64
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=20ff7a2d684e8210f999912ebc0a2c64c8b842db
Log:
some strtol replacements
Changed paths:
M Zend/zend_ini.c
M Zend/zend_operators.c
Diff:
diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c
index 3afb67b..73fac48 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 0fd8caf..f238893 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;