summaryrefslogtreecommitdiff
path: root/Zend/zend_ini.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-08-16 11:16:11 +0200
committerAnatol Belski <ab@php.net>2014-08-16 11:16:11 +0200
commit8ee2a4a9b5de682c0b37670e1f4f86242b1650ce (patch)
tree7768898294c125f79de082a986e962aa6cb23094 /Zend/zend_ini.c
parent735ec33b828bc4429c4ec8de7ba547925a4b44e3 (diff)
downloadphp-git-8ee2a4a9b5de682c0b37670e1f4f86242b1650ce.tar.gz
first shot on merging the core fro the int64 branch
Diffstat (limited to 'Zend/zend_ini.c')
-rw-r--r--Zend/zend_ini.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c
index c3a02d53a3..52585005b9 100644
--- a/Zend/zend_ini.c
+++ b/Zend/zend_ini.c
@@ -208,9 +208,9 @@ ZEND_API int zend_register_ini_entries(const zend_ini_entry *ini_entry, int modu
hashed_ini_entry->module_number = module_number;
if ((zend_get_configuration_directive(p->name, p->name_length, &default_value)) == SUCCESS) {
if (!hashed_ini_entry->on_modify
- || hashed_ini_entry->on_modify(hashed_ini_entry, Z_STRVAL(default_value), Z_STRLEN(default_value), hashed_ini_entry->mh_arg1, hashed_ini_entry->mh_arg2, hashed_ini_entry->mh_arg3, ZEND_INI_STAGE_STARTUP TSRMLS_CC) == SUCCESS) {
+ || hashed_ini_entry->on_modify(hashed_ini_entry, Z_STRVAL(default_value), Z_STRSIZE(default_value), hashed_ini_entry->mh_arg1, hashed_ini_entry->mh_arg2, hashed_ini_entry->mh_arg3, ZEND_INI_STAGE_STARTUP TSRMLS_CC) == SUCCESS) {
hashed_ini_entry->value = Z_STRVAL(default_value);
- hashed_ini_entry->value_length = Z_STRLEN(default_value);
+ hashed_ini_entry->value_length = Z_STRSIZE(default_value);
config_directive_success = 1;
}
}
@@ -352,7 +352,7 @@ ZEND_API int zend_ini_register_displayer(char *name, uint name_length, void (*di
* Data retrieval
*/
-ZEND_API long zend_ini_long(char *name, uint name_length, int orig) /* {{{ */
+ZEND_API zend_int_t zend_ini_int(char *name, uint name_length, int orig) /* {{{ */
{
zend_ini_entry *ini_entry;
TSRMLS_FETCH();
@@ -360,9 +360,9 @@ ZEND_API long zend_ini_long(char *name, uint name_length, int orig) /* {{{ */
ini_entry = zend_hash_str_find_ptr(EG(ini_directives), name, name_length);
if (ini_entry) {
if (orig && ini_entry->modified) {
- return (ini_entry->orig_value ? strtol(ini_entry->orig_value, NULL, 0) : 0);
+ return (ini_entry->orig_value ? ZEND_STRTOI(ini_entry->orig_value, NULL, 0) : 0);
} else {
- return (ini_entry->value ? strtol(ini_entry->value, NULL, 0) : 0);
+ return (ini_entry->value ? ZEND_STRTOI(ini_entry->value, NULL, 0) : 0);
}
}
@@ -587,7 +587,7 @@ ZEND_API ZEND_INI_MH(OnUpdateBool) /* {{{ */
ZEND_API ZEND_INI_MH(OnUpdateLong) /* {{{ */
{
- long *p;
+ zend_int_t *p;
#ifndef ZTS
char *base = (char *) mh_arg2;
#else
@@ -596,7 +596,7 @@ ZEND_API ZEND_INI_MH(OnUpdateLong) /* {{{ */
base = (char *) ts_resource(*((int *) mh_arg2));
#endif
- p = (long *) (base+(size_t) mh_arg1);
+ p = (zend_int_t *) (base+(size_t) mh_arg1);
*p = zend_atol(new_value, new_value_length);
return SUCCESS;
@@ -605,7 +605,7 @@ ZEND_API ZEND_INI_MH(OnUpdateLong) /* {{{ */
ZEND_API ZEND_INI_MH(OnUpdateLongGEZero) /* {{{ */
{
- long *p, tmp;
+ zend_int_t *p, tmp;
#ifndef ZTS
char *base = (char *) mh_arg2;
#else
@@ -619,7 +619,7 @@ ZEND_API ZEND_INI_MH(OnUpdateLongGEZero) /* {{{ */
return FAILURE;
}
- p = (long *) (base+(size_t) mh_arg1);
+ p = (zend_int_t *) (base+(size_t) mh_arg1);
*p = tmp;
return SUCCESS;