|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesgaman (last revision 2010-04-12 03:01 UTC by kaka at yahoo dot com)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-07-28 21:12 UTC] svn@php.net
[2009-07-28 21:14 UTC] jani@php.net
[2009-07-28 21:14 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 30 01:00:01 2025 UTC |
Description: ------------ PHP 5.3 seems to have missed a few things internally (macro-wise) when it comes to namespaces. When developing an extension for 5.3, I noticed the following: Zend/zend_API.h:93 #define ZEND_NS_NAMED_FE(ns, zend_name, name, arg_info) It's blank! I do not see any options to submit patches, therefore, this should be the definition: #define ZEND_NS_NAMED_FE(ns, zend_name, name, arg_info) \ ZEND_NS_FENTRY(ns, zend_name, name, arg_info, 0) In addition, PHP_NS_* aliases are missing for the ZEND_NS_* macros. For example, PHP_FE is an alias to ZEND_FE. Therefore, the following macros should be added: #define PHP_NS_FE ZEND_NS_FE #define PHP_NS_NAMED_FE ZEND_NS_NAMED_FE #define PHP_NS_DEP_FE ZEND_NS_DEP_FE #define PHP_NS_FALIAS ZEND_NS_FALIAS #define PHP_NS_DEP_FALIAS ZEND_NS_DEP_FALIAS If you could provide me with a means to submit a patch, I would be more than happy to do it myself, as I feel this to be an important (albeit minor) addition for extension developers in order to keep things consistent, and less confusing. Reproduce code: --------------- zend_function_entry php_test_functions[] = { ZEND_NS_NAMED_FE( "Ns", myfunc, test_myfunc, NULL ) { NULL, NULL, NULL } }; --- <?php var_dump( get_extension_funcs('test') ); ?> Expected result: ---------------- array(1) { [0]=> string(16) "Ns\myfunc" } Actual result: -------------- array(0) { }