com php-src: fixed ini_set for integers: Zend/zend_ ini.c Zend/zend_ini.h
| From: | Anatol Belski | Date: | Sat, 23 Nov 2013 08:52:33 +0000 |
| Subject: | com php-src: fixed ini_set for integers: Zend/zend_ ini.c Zend/zend_ini.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-74027@lists.php.net to get a copy of this message | ||
Commit: 4a6981433d8f4008e702e46ca4321ee0dab5b96d
Author: Anatol Belski <ab@php.net> Sat, 23 Nov 2013 09:52:33 +0100
Parents: 639924fa2ccc5fd214725abef38afbd779e19ec0
Branches: str_size_and_int64
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4a6981433d8f4008e702e46ca4321ee0dab5b96d
Log:
fixed ini_set for integers
Changed paths:
M Zend/zend_ini.c
M Zend/zend_ini.h
Diff:
diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c
index 132dfee..d35bbe0 100644
--- a/Zend/zend_ini.c
+++ b/Zend/zend_ini.c
@@ -345,7 +345,7 @@ ZEND_API int zend_ini_register_displayer(char *name, zend_str_size_uint name_len
* Data retrieval
*/
-ZEND_API long zend_ini_long(char *name, zend_str_size_uint name_length, int orig) /* {{{ */
+ZEND_API zend_int_t zend_ini_long(char *name, zend_str_size_uint name_length, int orig) /* {{{ */
{
zend_ini_entry *ini_entry;
TSRMLS_FETCH();
@@ -577,7 +577,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
@@ -586,7 +586,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;
@@ -595,7 +595,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
@@ -609,7 +609,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;
diff --git a/Zend/zend_ini.h b/Zend/zend_ini.h
index 42bd799..5a3ee67 100644
--- a/Zend/zend_ini.h
+++ b/Zend/zend_ini.h
@@ -45,7 +45,7 @@
# else /* ! (CRAY || __arm) */
# define XtOffset(p_type, field) \
- ((long) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL)))
+ ((zend_int_t) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL)))
# endif /* !CRAY */
@@ -99,7 +99,7 @@ ZEND_API int zend_alter_ini_entry_ex(char *name, zend_str_size_uint name_length,
ZEND_API int zend_restore_ini_entry(char *name, zend_str_size_uint name_length, int stage);
ZEND_API void display_ini_entries(zend_module_entry *module);
-ZEND_API long zend_ini_long(char *name, zend_str_size_uint name_length, int orig);
+ZEND_API zend_int_t zend_ini_long(char *name, zend_str_size_uint name_length, int orig);
ZEND_API double zend_ini_double(char *name, zend_str_size_uint name_length, int orig);
ZEND_API char *zend_ini_string(char *name, zend_str_size_uint name_length, int orig);
ZEND_API char *zend_ini_string_ex(char *name, zend_str_size_uint name_length, int orig, zend_bool
*exists);