Hi Laruence, I'v sent another PR https://github.com/php/php-src/pull/88 to improve the previous commit :)
Thanks. -- reeze | reeze.cn 在 2012年5月23日星期三,下午1:29,Laruence 写道: > Hi: > > I am going to revert this , please make a new PR after you fix this. :) > > thanks > > On Wed, May 23, 2012 at 11:55 AM, Reeze <reeze....@gmail.com > (mailto:reeze....@gmail.com)> wrote: > > Hi, Nuno, > > Thanks for reminding, I've attached a patch for this. could you take a look? > > GET_REFLECTION_OBJECT_PTR used widely, but define yet another macro seems > > useless, so I expand the macro. > > > > Thanks. > > > > Best > > -- > > reeze | reeze.cn > > > > 在 2012年5月23日星期三,上午2:50,Nuno Lopes 写道: > > > > Commit: 054f3e3ce5af13c2c3a6ccd54f7dc3e2f6cd4f74 > > Author: reeze <reeze....@gmail.com (mailto:reeze....@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 > > > > > > > > -- > > PHP CVS Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > -- > Laruence Xinchen Hui > http://www.laruence.com/ > >