diff options
author | Zeev Suraski <zeev@php.net> | 1999-04-28 20:26:33 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 1999-04-28 20:26:33 +0000 |
commit | 66476011ddb8a3bee0558df90a201cbbfee1434c (patch) | |
tree | 7a4e01f282db00b604f9445c8170515f86ecbf89 /main/php_ini.h | |
parent | 1aaf98e54bc25eac01eaad6f2ea19e1633b6ac5d (diff) | |
download | php-git-66476011ddb8a3bee0558df90a201cbbfee1434c.tar.gz |
A step towards generalizing the INI mechanism even more
Diffstat (limited to 'main/php_ini.h')
-rw-r--r-- | main/php_ini.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/main/php_ini.h b/main/php_ini.h index eaedca5aaa..12e7b5da7b 100644 --- a/main/php_ini.h +++ b/main/php_ini.h @@ -10,7 +10,7 @@ typedef struct _php_ini_entry php_ini_entry; -#define PHP_INI_MH(name) int name(php_ini_entry *entry, char *new_value, uint new_value_length, void *mh_arg) +#define PHP_INI_MH(name) int name(php_ini_entry *entry, char *new_value, uint new_value_length, void *mh_arg1, void *mh_arg2, void *mh_arg3) struct _php_ini_entry { int module_number; @@ -18,7 +18,9 @@ struct _php_ini_entry { char *name; uint name_length; PHP_INI_MH((*on_modify)); - void *mh_arg; + void *mh_arg1; + void *mh_arg2; + void *mh_arg3; char *value; uint value_length; @@ -44,8 +46,17 @@ char *php_ini_string(char *name, uint name_length, int orig); #define PHP_INI_BEGIN() static php_ini_entry ini_entries[] = { -#define PHP_INI_ENTRY(name, default_value, modifyable, on_modify, ptr) \ - { 0, modifyable, name, sizeof(name), on_modify, ptr, default_value, sizeof(default_value)-1, NULL, 0, 0 }, +#define PHP_INI_ENTRY3(name, default_value, modifyable, on_modify, arg1, arg2, arg3) \ + { 0, modifyable, name, sizeof(name), on_modify, arg1, arg2, arg3, default_value, sizeof(default_value)-1, NULL, 0, 0 }, + +#define PHP_INI_ENTRY2(name, default_value, modifyable, on_modify, arg1, arg2) \ + PHP_INI_ENTRY3(name, default_value, modifyable, on_modify, arg1, arg2, NULL) + +#define PHP_INI_ENTRY1(name, default_value, modifyable, on_modify, arg1) \ + PHP_INI_ENTRY3(name, default_value, modifyable, on_modify, arg1, NULL, NULL) + +#define PHP_INI_ENTRY(name, default_value, modifyable, on_modify) \ + PHP_INI_ENTRY3(name, default_value, modifyable, on_modify, NULL, NULL, NULL) #define PHP_INI_END() \ { 0, 0, NULL, 0, NULL, NULL, NULL, 0, NULL, 0, 0 } }; |