diff options
Diffstat (limited to 'Zend/zend_ini.c')
-rw-r--r-- | Zend/zend_ini.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index c4951acee9..257c0152a2 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -530,6 +530,28 @@ ZEND_API ZEND_INI_MH(OnUpdateLong) return SUCCESS; } +ZEND_API ZEND_INI_MH(OnUpdateLongGEZero) +{ + long *p, tmp; +#ifndef ZTS + char *base = (char *) mh_arg2; +#else + char *base; + + base = (char *) ts_resource(*((int *) mh_arg2)); +#endif + + tmp = zend_atoi(new_value, new_value_length); + if (tmp < 0) { + return FAILURE; + } + + p = (long *) (base+(size_t) mh_arg1); + *p = tmp; + + return SUCCESS; +} + ZEND_API ZEND_INI_MH(OnUpdateReal) { |