summaryrefslogtreecommitdiff
path: root/ext/spl/spl_functions.h
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-11-09 14:05:36 +0000
committerMarcus Boerger <helly@php.net>2003-11-09 14:05:36 +0000
commit159c538bcf7cc649410a7e91b11584dcebcf1b55 (patch)
tree2e5d3063aaf3733744fa81a1614fd526f9881be1 /ext/spl/spl_functions.h
parent44dc9eb3e4ae8be3d3d187b8e6335d768447fed5 (diff)
downloadphp-git-159c538bcf7cc649410a7e91b11584dcebcf1b55.tar.gz
Major update:
- Remove all overloading hooks -> array_read/array_access must be rewritten - Remove all basic iterators - Remove all 'spl_' prefixing exposed to user level - Add RecursiveIterator, RecursiveIteratorIterator - Add DirectoryIterator, DirectoryTreeIterator - Add some examples
Diffstat (limited to 'ext/spl/spl_functions.h')
-rwxr-xr-xext/spl/spl_functions.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/ext/spl/spl_functions.h b/ext/spl/spl_functions.h
index 1a2aa15037..99dfd7f1c8 100755
--- a/ext/spl/spl_functions.h
+++ b/ext/spl/spl_functions.h
@@ -24,19 +24,22 @@
typedef zend_object_value (*create_object_func_t)(zend_class_entry *class_type TSRMLS_DC);
#define REGISTER_SPL_STD_CLASS(class_name, obj_ctor) \
- spl_register_std_class(&spl_ce_ ## class_name, "spl_" # class_name, obj_ctor, NULL TSRMLS_CC);
+ spl_register_std_class(&spl_ce_ ## class_name, # class_name, obj_ctor, NULL TSRMLS_CC);
#define REGISTER_SPL_STD_CLASS_EX(class_name, obj_ctor, funcs) \
- spl_register_std_class(&spl_ce_ ## class_name, "spl_" # class_name, obj_ctor, funcs TSRMLS_CC);
+ spl_register_std_class(&spl_ce_ ## class_name, # class_name, obj_ctor, funcs TSRMLS_CC);
+
+#define REGISTER_SPL_SUB_CLASS_EX(class_name, parent_class_name, obj_ctor, funcs) \
+ spl_register_sub_class(&spl_ce_ ## class_name, spl_ce_ ## parent_class_name, # class_name, obj_ctor, funcs TSRMLS_CC);
#define REGISTER_SPL_INTERFACE(class_name) \
- spl_register_interface(&spl_ce_ ## class_name, "spl_" # class_name, spl_funcs_ ## class_name TSRMLS_CC);
+ spl_register_interface(&spl_ce_ ## class_name, # class_name, spl_funcs_ ## class_name TSRMLS_CC);
#define REGISTER_SPL_PARENT_CE(class_name, parent_class) \
spl_register_parent_ce(spl_ce_ ## class_name, spl_ce_ ## parent_class TSRMLS_CC);
-#define REGISTER_SPL_IMPLEMENT(class_name, interface_name) \
- spl_register_implement(spl_ce_ ## class_name, spl_ce_ ## interface_name TSRMLS_CC);
+#define REGISTER_SPL_IMPLEMENTS(class_name, interface_name) \
+ zend_class_implements(spl_ce_ ## class_name TSRMLS_CC, 1, spl_ce_ ## interface_name);
#define REGISTER_SPL_FUNCTIONS(class_name, function_list) \
spl_register_functions(spl_ce_ ## class_name, function_list TSRMLS_CC);
@@ -47,11 +50,11 @@ typedef zend_object_value (*create_object_func_t)(zend_class_entry *class_type T
void spl_destroy_class(zend_class_entry ** ppce);
void spl_register_std_class(zend_class_entry ** ppce, char * class_name, create_object_func_t ctor, function_entry * function_list TSRMLS_DC);
+void spl_register_sub_class(zend_class_entry ** ppce, zend_class_entry * parent_ce, char * class_name, create_object_func_t ctor, function_entry * function_list TSRMLS_DC);
void spl_register_interface(zend_class_entry ** ppce, char * class_name, zend_function_entry *functions TSRMLS_DC);
void spl_register_parent_ce(zend_class_entry * class_entry, zend_class_entry * parent_class TSRMLS_DC);
-void spl_register_implement(zend_class_entry * class_entry, zend_class_entry * interface_entry TSRMLS_DC);
void spl_register_functions(zend_class_entry * class_entry, function_entry * function_list TSRMLS_DC);
void spl_register_property( zend_class_entry * class_entry, char *prop_name, zval *prop_val, int prop_flags TSRMLS_DC);
@@ -59,10 +62,13 @@ void spl_add_class_name(zval * list, zend_class_entry * pce TSRMLS_DC);
void spl_add_interfaces(zval * list, zend_class_entry * pce TSRMLS_DC);
int spl_add_classes(zend_class_entry ** ppce, zval *list TSRMLS_DC);
-#define SPL_CLASS_FE(class_name, function_name, arg_info, flags) \
+#define SPL_ME(class_name, function_name, arg_info, flags) \
PHP_ME( spl_ ## class_name, function_name, arg_info, flags)
+
+#define SPL_ABSTRACT_ME(class_name, arg_info, flags) \
+ ZEND_ABSTRACT_ME( spl_ ## class_name, arg_info, flags)
-#define SPL_CLASS_FUNCTION(class_name, function_name) \
+#define SPL_METHOD(class_name, function_name) \
PHP_METHOD(spl_ ## class_name, function_name)
#endif /* PHP_FUNCTIONS_H */