return r;
}
-static void _free_reg_cache(reg_cache *rc)
+static int _free_reg_cache(reg_cache *rc)
{
regfree(&rc->preg);
+ return 1;
}
#define regfree(a);
static void php_reg_init_globals(php_reg_globals *reg_globals)
{
- _php3_hash_init(®_globals->ht_rc, 0, NULL, (void (*)(void *)) _free_reg_cache, 1);
+ _php3_hash_init(®_globals->ht_rc, 0, NULL, (int (*)(void *)) _free_reg_cache, 1);
}
static int php_minit_regex(INIT_FUNC_ARGS)
}
-static void _php_free_pcre_cache(void *data)
+static int _php_free_pcre_cache(void *data)
{
pcre_cache_entry *pce = (pcre_cache_entry *) data;
pefree(pce->re, 1);
+ return 1;
}
static HashTable *user_shutdown_function_names;
/* some prototypes for local functions */
-void user_shutdown_function_dtor(pval *user_shutdown_function_name);
+int user_shutdown_function_dtor(pval *user_shutdown_function_name);
int user_shutdown_function_executor(pval *user_shutdown_function_name);
void php3_call_shutdown_functions(void);
#ifdef HAVE_PUTENV
static HashTable putenv_ht;
-static void _php3_putenv_destructor(putenv_entry *pe)
+static int _php3_putenv_destructor(putenv_entry *pe)
{
if (pe->previous_value) {
putenv(pe->previous_value);
}
efree(pe->putenv_string);
efree(pe->key);
+ return 1;
}
#endif
{
strtok_string = NULL;
#ifdef HAVE_PUTENV
- if (_php3_hash_init(&putenv_ht, 1, NULL, (void (*)(void *)) _php3_putenv_destructor, 0) == FAILURE) {
+ if (_php3_hash_init(&putenv_ht, 1, NULL, (int (*)(void *)) _php3_putenv_destructor, 0) == FAILURE) {
return FAILURE;
}
#endif
}
-void user_shutdown_function_dtor(pval *user_shutdown_function_name)
+int user_shutdown_function_dtor(pval *user_shutdown_function_name)
{
pval retval;
CLS_FETCH();
pval_destructor(&retval);
}
pval_destructor(user_shutdown_function_name);
+ return 1;
}
convert_to_string(arg);
if (!user_shutdown_function_names) {
user_shutdown_function_names = (HashTable *) emalloc(sizeof(HashTable));
- _php3_hash_init(user_shutdown_function_names, 0, NULL, (void (*)(void *))user_shutdown_function_dtor, 0);
+ _php3_hash_init(user_shutdown_function_names, 0, NULL, (int (*)(void *))user_shutdown_function_dtor, 0);
}
shutdown_function_name = *arg;
return r;
}
-static void _free_reg_cache(reg_cache *rc)
+static int _free_reg_cache(reg_cache *rc)
{
regfree(&rc->preg);
+ return 1;
}
#define regfree(a);
static void php_reg_init_globals(php_reg_globals *reg_globals)
{
- _php3_hash_init(®_globals->ht_rc, 0, NULL, (void (*)(void *)) _free_reg_cache, 1);
+ _php3_hash_init(®_globals->ht_rc, 0, NULL, (int (*)(void *)) _free_reg_cache, 1);
}
static int php_minit_regex(INIT_FUNC_ARGS)
}
-static void pvalue_config_destructor(pval *pvalue)
+static int pvalue_config_destructor(pval *pvalue)
{
if (pvalue->type == IS_STRING && pvalue->value.str.val != empty_string) {
free(pvalue->value.str.val);
}
+ return 1;
}
-static void pvalue_browscap_destructor(pval *pvalue)
+static int pvalue_browscap_destructor(pval *pvalue)
{
if (pvalue->type == IS_OBJECT || pvalue->type == IS_ARRAY) {
_php3_hash_destroy(pvalue->value.ht);
free(pvalue->value.ht);
}
+ return 1;
}
{
PLS_FETCH();
- if (_php3_hash_init(&configuration_hash, 0, NULL, (void (*)(void *))pvalue_config_destructor, 1)==FAILURE) {
+ if (_php3_hash_init(&configuration_hash, 0, NULL, (int (*)(void *))pvalue_config_destructor, 1)==FAILURE) {
return FAILURE;
}
char *browscap = INI_STR("browscap");
if (browscap) {
- if (_php3_hash_init(&browser_hash, 0, NULL, (void (*)(void *))pvalue_browscap_destructor, 1)==FAILURE) {
+ if (_php3_hash_init(&browser_hash, 0, NULL, (int (*)(void *))pvalue_browscap_destructor, 1)==FAILURE) {
return FAILURE;
}
/*printf("'%s' (%d)\n",$1.value.str.val,$1.value.str.len+1);*/
tmp.value.ht = (HashTable *) malloc(sizeof(HashTable));
- _php3_hash_init(tmp.value.ht, 0, NULL, (void (*)(void *))pvalue_config_destructor, 1);
+ _php3_hash_init(tmp.value.ht, 0, NULL, (int (*)(void *))pvalue_config_destructor, 1);
tmp.type = IS_OBJECT;
_php3_hash_update(active__php3_hash_table, $1.value.str.val, $1.value.str.len+1, (void *) &tmp, sizeof(pval), (void **) ¤t_section);
tmp.value.str.val = php3_strndup($1.value.str.val,$1.value.str.len);