summaryrefslogtreecommitdiff
path: root/ext/standard/basic_functions.c
diff options
context:
space:
mode:
authorAndrei Zmievski <andrei@php.net>2002-02-21 03:32:42 +0000
committerAndrei Zmievski <andrei@php.net>2002-02-21 03:32:42 +0000
commit513e598d1ec6634cf4652c7946e8218132e56518 (patch)
tree3972f5ab1109a2647df8ed2fa4ca9c4ec61f782e /ext/standard/basic_functions.c
parent444d3a6150721f97bd12a0d8b65251fde99ca48e (diff)
downloadphp-git-513e598d1ec6634cf4652c7946e8218132e56518.tar.gz
Adding object aggregation capability along with tests.
Diffstat (limited to 'ext/standard/basic_functions.c')
-rw-r--r--ext/standard/basic_functions.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index e4acca5387..49cc891dbb 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -812,6 +812,17 @@ function_entry basic_functions[] = {
#endif
PHP_FE(str_rot13, NULL)
+
+ /* functions from aggregate.c */
+ PHP_FE(aggregate, first_arg_force_ref)
+ PHP_FE(aggregate_methods, first_arg_force_ref)
+ PHP_FE(aggregate_methods_by_list, first_arg_force_ref)
+ PHP_FE(aggregate_methods_by_regexp, first_arg_force_ref)
+ PHP_FE(aggregate_properties, first_arg_force_ref)
+ PHP_FE(aggregate_properties_by_list, first_arg_force_ref)
+ PHP_FE(aggregate_properties_by_regexp, first_arg_force_ref)
+ PHP_FE(deaggregate, first_arg_force_ref)
+ PHP_FE(aggregation_info, first_arg_force_ref)
{NULL, NULL, NULL}
};
@@ -895,6 +906,7 @@ static void basic_globals_ctor(php_basic_globals *basic_globals_p TSRMLS_DC)
BG(next) = NULL;
BG(left) = -1;
BG(user_tick_functions) = NULL;
+ BG(aggregation_table) = NULL;
zend_hash_init(&BG(sm_protected_env_vars), 5, NULL, NULL, 1);
BG(sm_allowed_env_vars) = NULL;
@@ -1100,6 +1112,13 @@ PHP_RSHUTDOWN_FUNCTION(basic)
efree(BG(user_tick_functions));
BG(user_tick_functions) = NULL;
}
+
+ if (BG(aggregation_table)) {
+ zend_hash_destroy(BG(aggregation_table));
+ efree(BG(aggregation_table));
+ BG(aggregation_table) = NULL;
+ }
+
#ifdef HAVE_MMAP
if (BG(mmap_file)) {
munmap(BG(mmap_file), BG(mmap_len));
@@ -2243,7 +2262,7 @@ PHP_FUNCTION(register_tick_function)
BG(user_tick_functions) = (zend_llist *) emalloc(sizeof(zend_llist));
zend_llist_init(BG(user_tick_functions),
sizeof(user_tick_function_entry),
- (void (*)(void *)) user_tick_function_dtor, 0);
+ (llist_dtor_func_t) user_tick_function_dtor, 0);
php_add_tick_function(run_user_tick_functions);
}