com php-src: Let's add a class entry for testing: Zend/zend_b uiltin_functions.c

From: Date: Thu, 21 Jan 2016 05:53:29 +0000
Subject: com php-src: Let's add a class entry for testing: Zend/zend_b uiltin_functions.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-90721@lists.php.net to get a copy of this message
Commit: 2ee73ee094ab33b917e350b7171a543bd2b24947 Author: Xinchen Hui <laruence@gmail.com> Thu, 21 Jan 2016 13:53:29 +0800 Parents: 62f3e5adf88ded51a0112977ff2a269bea58d44d Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2ee73ee094ab33b917e350b7171a543bd2b24947 Log: Let's add a class entry for testing Changed paths: M Zend/zend_builtin_functions.c Diff: diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 927c75b..eba6ce3 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -31,6 +31,11 @@ #undef ZEND_TEST_EXCEPTIONS +#if ZEND_DEBUG +static zend_class_entry *zend_test_interface; +static zend_class_entry *zend_test_class; +#endif + static ZEND_FUNCTION(zend_version); static ZEND_FUNCTION(func_num_args); static ZEND_FUNCTION(func_get_arg); @@ -339,6 +344,15 @@ ZEND_MINIT_FUNCTION(core) { /* {{{ */ zend_register_default_classes(); +#if ZEND_DEBUG + INIT_CLASS_ENTRY(class_entry, "_ZendTestInterface", NULL); + zend_test_interface = zend_register_internal_interface(&class_entry); + zend_declare_class_constant_long(zend_test_interface, ZEND_STRL("DUMMY"), 0); + INIT_CLASS_ENTRY(class_entry, "_ZendTestClass", NULL); + zend_test_class = zend_register_internal_class_ex(&class_entry, NULL); + zend_class_implements(zend_test_class, 1, zend_test_interface); +#endif + return SUCCESS; } /* }}} */

« previous php.cvs (#90721) next »