]> granicus.if.org Git - php/commitdiff
Type library support in COM module
authorZeev Suraski <zeev@php.net>
Thu, 8 Apr 1999 23:14:56 +0000 (23:14 +0000)
committerZeev Suraski <zeev@php.net>
Thu, 8 Apr 1999 23:14:56 +0000 (23:14 +0000)
main/php_ini.c
main/php_ini.h

index 32d18e2fe28be6fbf72d0eac422a5f8a50e3d61c..163021bd865175347ae3f251dfcf2daa08e0683f 100644 (file)
@@ -73,8 +73,11 @@ int php_register_ini_entries(php_ini_entry *ini_entry, int module_number)
                        return FAILURE;
                }
                if ((default_value=cfg_get_entry(p->name, p->name_length))) {
-                       hashed_ini_entry->value = default_value->value.str.val;
-                       hashed_ini_entry->value_length = default_value->value.str.len;
+                       if (!hashed_ini_entry->on_modify
+                               || hashed_ini_entry->on_modify(hashed_ini_entry, default_value->value.str.val, default_value->value.str.len)==SUCCESS) {
+                               hashed_ini_entry->value = default_value->value.str.val;
+                               hashed_ini_entry->value_length = default_value->value.str.len;
+                       }
                }
                hashed_ini_entry->modified = 0;
                p++;
index 38c6c7a771ca1742e67ad96b5ad5022560747ba3..d4cf1eada23ed01a3808f6feac5f24b0c49a766c 100644 (file)
@@ -15,7 +15,7 @@ struct _php_ini_entry {
        int modifyable;
        char *name;
        uint name_length;
-       int (*on_modify)(php_ini_entry *entry, pval *new_value);
+       int (*on_modify)(php_ini_entry *entry, char *new_value, uint new_value_length);
 
        char *value;
        uint value_length;