summaryrefslogtreecommitdiff
path: root/main/php_ini.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>1999-04-28 21:14:47 +0000
committerZeev Suraski <zeev@php.net>1999-04-28 21:14:47 +0000
commita877f6d3807b7c29da8adea30491381feecfc40f (patch)
treee3c119a286f4198203ba578c147f75bb987be281 /main/php_ini.c
parent66476011ddb8a3bee0558df90a201cbbfee1434c (diff)
downloadphp-git-a877f6d3807b7c29da8adea30491381feecfc40f.tar.gz
Additional generalization of the INI mechanism. Avoid needing specialized
message handlers in 99% of the cases.
Diffstat (limited to 'main/php_ini.c')
-rw-r--r--main/php_ini.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/main/php_ini.c b/main/php_ini.c
index a4725c05e1..815b582cbd 100644
--- a/main/php_ini.c
+++ b/main/php_ini.c
@@ -241,12 +241,11 @@ PHP_INI_MH(OnUpdateInt)
{
long *p;
#ifndef ZTS
- char *base = (char *) &core_globals;
+ char *base = (char *) mh_arg2;
#else
char *base;
- PLS_FETCH();
- base = (char *) core_globals;
+ base = (char *) ts_resource(*((int *) mh_arg2));
#endif
p = (long *) (base+(size_t) mh_arg1);
@@ -260,12 +259,11 @@ PHP_INI_MH(OnUpdateReal)
{
double *p;
#ifndef ZTS
- char *base = (char *) &core_globals;
+ char *base = (char *) mh_arg2;
#else
char *base;
- PLS_FETCH();
- base = (char *) core_globals;
+ base = (char *) ts_resource(*((int *) mh_arg2));
#endif
p = (double *) (base+(size_t) mh_arg1);
@@ -279,12 +277,11 @@ PHP_INI_MH(OnUpdateString)
{
char **p;
#ifndef ZTS
- char *base = (char *) &core_globals;
+ char *base = (char *) mh_arg2;
#else
char *base;
- PLS_FETCH();
- base = (char *) core_globals;
+ base = (char *) ts_resource(*((int *) mh_arg2));
#endif
p = (char **) (base+(size_t) mh_arg1);
@@ -298,12 +295,11 @@ PHP_INI_MH(OnUpdateStringUnempty)
{
char **p;
#ifndef ZTS
- char *base = (char *) &core_globals;
+ char *base = (char *) mh_arg2;
#else
char *base;
- PLS_FETCH();
- base = (char *) core_globals;
+ base = (char *) ts_resource(*((int *) mh_arg2));
#endif
if (new_value && !new_value[0]) {