summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-08-16 20:46:22 +0000
committerMarcus Boerger <helly@php.net>2003-08-16 20:46:22 +0000
commitfe1a086d19a9635ee9e7acb4466217345902834e (patch)
tree0fdde16775605fd5749572ef3f4974880a750732 /ext/reflection/php_reflection.c
parentc346aad91a3f5db185f7add67ddf778db59c7bbd (diff)
downloadphp-git-fe1a086d19a9635ee9e7acb4466217345902834e.tar.gz
Simplify abstract method declaration
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 2a9a4e5292..1277fca145 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -2171,7 +2171,7 @@ static zend_function_entry reflection_functions[] = {
};
static zend_function_entry reflector_functions[] = {
- ZEND_NAMED_FE(tostring, ZEND_FN(reflector_tostring), NULL)
+ ZEND_ABSTRACT_ME(reflector, tostring, NULL)
{NULL, NULL, NULL}
};
@@ -2266,7 +2266,6 @@ static zend_function_entry reflection_extension_functions[] = {
ZEND_API void zend_register_reflection_api(TSRMLS_D) {
zend_class_entry _reflection_entry;
- zend_function *mptr;
memcpy(&reflection_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
@@ -2277,11 +2276,6 @@ ZEND_API void zend_register_reflection_api(TSRMLS_D) {
reflector_ptr = zend_register_internal_class(&_reflection_entry TSRMLS_CC);
reflector_ptr->ce_flags = ZEND_ACC_ABSTRACT | ZEND_ACC_INTERFACE;
- /* Ugly... is there a better way to introduce an abstract method to a class? */
- if (zend_hash_find(&reflector_ptr->function_table, "tostring", sizeof("tostring"), (void **) &mptr) == SUCCESS) {
- mptr->common.fn_flags = ZEND_ACC_ABSTRACT | ZEND_ACC_PUBLIC;
- }
-
INIT_CLASS_ENTRY(_reflection_entry, "reflection_function", reflection_function_functions);
_reflection_entry.create_object = reflection_objects_new;
reflection_function_ptr = zend_register_internal_class(&_reflection_entry TSRMLS_CC);