diff options
Diffstat (limited to 'main/configuration-parser.y')
| -rw-r--r-- | main/configuration-parser.y | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/main/configuration-parser.y b/main/configuration-parser.y index e3830b85c6..28b3994b31 100644 --- a/main/configuration-parser.y +++ b/main/configuration-parser.y @@ -124,22 +124,20 @@ static void yyerror(char *str) } -static int pvalue_config_destructor(pval *pvalue) +static void pvalue_config_destructor(pval *pvalue) { if (pvalue->type == IS_STRING && pvalue->value.str.val != empty_string) { free(pvalue->value.str.val); } - return 1; } -static int pvalue_browscap_destructor(pval *pvalue) +static void pvalue_browscap_destructor(pval *pvalue) { if (pvalue->type == IS_OBJECT || pvalue->type == IS_ARRAY) { zend_hash_destroy(pvalue->value.ht); free(pvalue->value.ht); } - return 1; } @@ -147,7 +145,7 @@ int php_init_config(void) { PLS_FETCH(); - if (zend_hash_init(&configuration_hash, 0, NULL, (int (*)(void *))pvalue_config_destructor, 1)==FAILURE) { + if (zend_hash_init(&configuration_hash, 0, NULL, (void (*)(void *))pvalue_config_destructor, 1)==FAILURE) { return FAILURE; } @@ -246,7 +244,7 @@ PHP_MINIT_FUNCTION(browscap) char *browscap = INI_STR("browscap"); if (browscap) { - if (zend_hash_init(&browser_hash, 0, NULL, (int (*)(void *))pvalue_browscap_destructor, 1)==FAILURE) { + if (zend_hash_init(&browser_hash, 0, NULL, (void (*)(void *))pvalue_browscap_destructor, 1)==FAILURE) { return FAILURE; } @@ -461,7 +459,7 @@ statement: /*printf("'%s' (%d)\n",$1.value.str.val,$1.value.str.len+1);*/ tmp.value.ht = (HashTable *) malloc(sizeof(HashTable)); - zend_hash_init(tmp.value.ht, 0, NULL, (int (*)(void *))pvalue_config_destructor, 1); + zend_hash_init(tmp.value.ht, 0, NULL, (void (*)(void *))pvalue_config_destructor, 1); tmp.type = IS_OBJECT; zend_hash_update(activezend_hash_table, $1.value.str.val, $1.value.str.len+1, (void *) &tmp, sizeof(pval), (void **) ¤t_section); tmp.value.str.val = zend_strndup($1.value.str.val,$1.value.str.len); |
