Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2(PHP_5_3) / zend_builtin_functions.c

[email protected] (Marcus Boerger)
Newsgroups php.zend-engine.cvs
Message-ID <[email protected]>
Hello Felipe,

Sunday, November 16, 2008, 1:45:03 AM, you wrote:

> felipe          Sun Nov 16 00:45:03 2008 UTC

>   Modified files:              (Branch: PHP_5_3)
>     /ZendEngine2        zend_builtin_functions.c 
>   Log:
>   - MFH: Fixed strlen function entry (missing arginfo struct size, thanks Philip!)
>   
> http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_builtin_functions.c?r1=1.277.2.12.2.25.2.33&r2=1.277.2.12.2.25.2.34&diff_format=u
> Index: ZendEngine2/zend_builtin_functions.c
> diff -u ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.25.2.33
> ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.25.2.34
> --- ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.25.2.33   Sun Nov  2 21:19:30 2008
> +++ ZendEngine2/zend_builtin_functions.c        Sun Nov 16 00:45:03 2008
> @@ -17,7 +17,7 @@
>    
> +----------------------------------------------------------------------+
>  */
>  
> -/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.25.2.33 2008/11/02 21:19:30 felipe Exp $ */
> +/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.25.2.34 2008/11/16 00:45:03 felipe Exp $ */
>  
>  #include "zend.h"
>  #include "zend_API.h"
> @@ -346,7 +346,7 @@
>         ZEND_FE(func_num_args,          arginfo_func_num_args)
>         ZEND_FE(func_get_arg,           arginfo_func_get_arg)
>         ZEND_FE(func_get_args,          arginfo_func_get_args)
> -       { "strlen", zend_if_strlen, arginfo_strlen },
> +       {"strlen", zend_if_strlen,      arginfo_strlen, (zend_uint)
Why not rename the function and turn the entry into:
ZEND_FE(strlen, arginfo_strlen);
???

The old way was necessary in early days because we did not prepend the
function names.

marcus

> (sizeof(arginfo_strlen) / sizeof(struct _zend_arg_info)-1), 0},
>         ZEND_FE(strcmp,                         arginfo_strcmp)
>         ZEND_FE(strncmp,                        arginfo_strncmp)
>         ZEND_FE(strcasecmp,                     arginfo_strcasecmp)






Best regards,
 Marcus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.