some strtol replacements

This commit is contained in:
Anatol Belski committed 2013-10-27 11:05:40 +01:00
1 parent 23390de0e7
commit 20ff7a2d68
2 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -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);
}
}
+3 -3
View File
@@ -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;