cvs: ZendEngine2 / zend_reflection_api.c

From: Date: Sun, 24 Aug 2003 15:07:54 +0000
Subject: cvs: ZendEngine2 / zend_reflection_api.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-1686@lists.php.net to get a copy of this message
helly Sun Aug 24 11:07:54 2003 EDT Modified files: /ZendEngine2 zend_reflection_api.c Log: Add dedicated reflection_exception Index: ZendEngine2/zend_reflection_api.c diff -u ZendEngine2/zend_reflection_api.c:1.31 ZendEngine2/zend_reflection_api.c:1.32 --- ZendEngine2/zend_reflection_api.c:1.31 Sun Aug 24 08:07:13 2003 +++ ZendEngine2/zend_reflection_api.c Sun Aug 24 11:07:54 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_reflection_api.c,v 1.31 2003/08/24 12:07:13 helly Exp $ */ +/* $Id: zend_reflection_api.c,v 1.32 2003/08/24 15:07:54 helly Exp $ */ #include "zend.h" #include "zend_API.h" #include "zend_default_classes.h" @@ -26,6 +26,16 @@ #include "zend_constants.h" #include "zend_ini.h" +/* Class entry pointers */ +zend_class_entry *reflector_ptr; +zend_class_entry *reflection_exception_ptr; +zend_class_entry *reflection_ptr; +zend_class_entry *reflection_function_ptr; +zend_class_entry *reflection_class_ptr; +zend_class_entry *reflection_method_ptr; +zend_class_entry *reflection_property_ptr; +zend_class_entry *reflection_extension_ptr; + /* Method macros */ #define METHOD_NOTSTATIC \ if (!this_ptr) { \ @@ -47,7 +57,7 @@ /* Exception throwing macro */ #define _DO_THROW(msg) \ - zend_throw_exception(msg, 0 TSRMLS_CC); \ + zend_throw_exception(reflection_exception_ptr, msg, 0 TSRMLS_CC); \ return; \ /* Smart string macros */ @@ -111,15 +121,6 @@ unsigned int free_ptr:1; } reflection_object; -/* Class entry pointers */ -zend_class_entry *reflector_ptr; -zend_class_entry *reflection_ptr; -zend_class_entry *reflection_function_ptr; -zend_class_entry *reflection_class_ptr; -zend_class_entry *reflection_method_ptr; -zend_class_entry *reflection_property_ptr; -zend_class_entry *reflection_extension_ptr; - static zend_object_handlers reflection_object_handlers; static void _default_get_entry(zval *object, char *name, int name_len, zval *return_value TSRMLS_DC) @@ -2239,6 +2240,9 @@ zend_class_entry _reflection_entry; memcpy(&reflection_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); + + INIT_CLASS_ENTRY(_reflection_entry, "reflection_exception", reflection_functions); + reflection_exception_ptr = zend_register_internal_class_ex(&_reflection_entry, zend_exception_get_default(), NULL TSRMLS_CC); INIT_CLASS_ENTRY(_reflection_entry, "reflection", reflection_functions); reflection_ptr = zend_register_internal_class(&_reflection_entry TSRMLS_CC);

« previous php.zend-engine.cvs (#1686) next »