Re: com php-src: Implemented FR #61602 Allow access to name of constant used as

From: Date: Tue, 22 May 2012 18:50:30 +0000
Subject: Re: com php-src: Implemented FR #61602 Allow access to name of constant used as
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-69137@lists.php.net to get a copy of this message
Commit:    054f3e3ce5af13c2c3a6ccd54f7dc3e2f6cd4f74
Author:    reeze <reeze.xia@gmail.com>         Tue, 3 Apr 2012 13:47:16 +0800
Parents: 3bf53aa911e1e2128a11aee45c126000635de006 Branches: PHP-5.4 master
Link:       http://git.php.net/?p=php-src.git;a=commitdiff;h=054f3e3ce5af13c2c3a6ccd54f7dc3e2f6cd4f74
Log: Implemented FR #61602 Allow access to name of constant used as default value Bugs: https://bugs.php.net/61602 diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 1cf65ce..ef1ed7e 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -1457,6 +1457,57 @@ static void _reflection_export(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *c } /* }}} */ +/* {{{ _reflection_param_get_default_param */ +static parameter_reference *_reflection_param_get_default_param(INTERNAL_FUNCTION_PARAMETERS) +{ + reflection_object *intern; + parameter_reference *param; + + if (zend_parse_parameters_none() == FAILURE) { + return NULL; + } + + GET_REFLECTION_OBJECT_PTR(param);
You cannot use GET_REFLECTION_OBJECT_PTR here because it has a 'return;' statement (i.e., without a return value). While gcc accepts this (but issues a warning), it's considered an error in C99, and it breaks the build with other compilers. Please either fix it or revert the patch. Nuno

« previous php.cvs (#69137) next »