svn: /php/php-src/ branches/PHP_5_4/Zend/zend_compile.c trunk/Zend/zend_compile.c
| From: | Felipe Pena | Date: | Fri, 18 Nov 2011 13:56:41 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_4/Zend/zend_compile.c trunk/Zend/zend_compile.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-67038@lists.php.net to get a copy of this message | ||
felipe Fri, 18 Nov 2011 13:56:41 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=319487
Log:
- CS
Changed paths:
U php/php-src/branches/PHP_5_4/Zend/zend_compile.c
U php/php-src/trunk/Zend/zend_compile.c
Modified: php/php-src/branches/PHP_5_4/Zend/zend_compile.c
===================================================================
--- php/php-src/branches/PHP_5_4/Zend/zend_compile.c 2011-11-18 13:53:47 UTC (rev 319486)
+++ php/php-src/branches/PHP_5_4/Zend/zend_compile.c 2011-11-18 13:56:41 UTC (rev 319487)
@@ -3625,8 +3625,7 @@
zend_get_function_declaration(fn TSRMLS_CC),
zend_get_function_declaration(other_trait_fn TSRMLS_CC));
}
- }
- else {
+ } else {
/* otherwise, do the full check */
do_inheritance_check_on_method(fn, other_trait_fn TSRMLS_CC);
}
@@ -3818,22 +3817,28 @@
{
if (!strncmp(mname, ZEND_CLONE_FUNC_NAME, mname_len)) {
ce->clone = fe; fe->common.fn_flags |= ZEND_ACC_CLONE;
- }
- else if (!strncmp(mname, ZEND_CONSTRUCTOR_FUNC_NAME, mname_len)) {
+ } else if (!strncmp(mname, ZEND_CONSTRUCTOR_FUNC_NAME, mname_len)) {
if (ce->constructor) {
zend_error(E_COMPILE_ERROR, "%s has colliding constructor definitions coming from
traits", ce->name);
}
ce->constructor = fe; fe->common.fn_flags |= ZEND_ACC_CTOR;
- }
- else if (!strncmp(mname, ZEND_DESTRUCTOR_FUNC_NAME, mname_len)) { ce->destructor = fe;
fe->common.fn_flags |= ZEND_ACC_DTOR; }
- else if (!strncmp(mname, ZEND_GET_FUNC_NAME, mname_len)) ce->__get = fe;
- else if (!strncmp(mname, ZEND_SET_FUNC_NAME, mname_len)) ce->__set = fe;
- else if (!strncmp(mname, ZEND_CALL_FUNC_NAME, mname_len)) ce->__call = fe;
- else if (!strncmp(mname, ZEND_UNSET_FUNC_NAME, mname_len)) ce->__unset = fe;
- else if (!strncmp(mname, ZEND_ISSET_FUNC_NAME, mname_len)) ce->__isset = fe;
- else if (!strncmp(mname, ZEND_CALLSTATIC_FUNC_NAME, mname_len)) ce->__callstatic= fe;
- else if (!strncmp(mname, ZEND_TOSTRING_FUNC_NAME, mname_len)) ce->__tostring = fe;
- else if (ce->name_length + 1 == mname_len) {
+ } else if (!strncmp(mname, ZEND_DESTRUCTOR_FUNC_NAME, mname_len)) {
+ ce->destructor = fe; fe->common.fn_flags |= ZEND_ACC_DTOR;
+ } else if (!strncmp(mname, ZEND_GET_FUNC_NAME, mname_len)) {
+ ce->__get = fe;
+ } else if (!strncmp(mname, ZEND_SET_FUNC_NAME, mname_len)) {
+ ce->__set = fe;
+ } else if (!strncmp(mname, ZEND_CALL_FUNC_NAME, mname_len)) {
+ ce->__call = fe;
+ } else if (!strncmp(mname, ZEND_UNSET_FUNC_NAME, mname_len)) {
+ ce->__unset = fe;
+ } else if (!strncmp(mname, ZEND_ISSET_FUNC_NAME, mname_len)) {
+ ce->__isset = fe;
+ } else if (!strncmp(mname, ZEND_CALLSTATIC_FUNC_NAME, mname_len)) {
+ ce->__callstatic = fe;
+ } else if (!strncmp(mname, ZEND_TOSTRING_FUNC_NAME, mname_len)) {
+ ce->__tostring = fe;
+ } else if (ce->name_length + 1 == mname_len) {
char *lowercase_name = emalloc(ce->name_length + 1);
zend_str_tolower_copy(lowercase_name, ce->name, ce->name_length);
lowercase_name = (char*)zend_new_interned_string(lowercase_name, ce->name_length + 1, 1
TSRMLS_CC);
@@ -4335,8 +4340,7 @@
"An alias (%s) was defined for method %s(), but this method does not exist",
cur_alias->alias,
cur_alias->trait_method->method_name);
- }
- else {
+ } else {
/** Here are two possible cases:
1) this is an attempt to modifiy the visibility
of a method introduce as part of another alias.
@@ -4354,8 +4358,7 @@
zend_error(E_COMPILE_ERROR,
"The modifiers for the trait alias %s() need to be changed in the same statment in
which the alias is defined. Error",
cur_alias->trait_method->method_name);
- }
- else {
+ } else {
efree(lc_method_name);
zend_error(E_COMPILE_ERROR,
"The modifiers of the trait method %s() are changed, but this method does not
exist. Error",
Modified: php/php-src/trunk/Zend/zend_compile.c
===================================================================
--- php/php-src/trunk/Zend/zend_compile.c 2011-11-18 13:53:47 UTC (rev 319486)
+++ php/php-src/trunk/Zend/zend_compile.c 2011-11-18 13:56:41 UTC (rev 319487)
@@ -3625,8 +3625,7 @@
zend_get_function_declaration(fn TSRMLS_CC),
zend_get_function_declaration(other_trait_fn TSRMLS_CC));
}
- }
- else {
+ } else {
/* otherwise, do the full check */
do_inheritance_check_on_method(fn, other_trait_fn TSRMLS_CC);
}
@@ -3818,22 +3817,28 @@
{
if (!strncmp(mname, ZEND_CLONE_FUNC_NAME, mname_len)) {
ce->clone = fe; fe->common.fn_flags |= ZEND_ACC_CLONE;
- }
- else if (!strncmp(mname, ZEND_CONSTRUCTOR_FUNC_NAME, mname_len)) {
+ } else if (!strncmp(mname, ZEND_CONSTRUCTOR_FUNC_NAME, mname_len)) {
if (ce->constructor) {
zend_error(E_COMPILE_ERROR, "%s has colliding constructor definitions coming from
traits", ce->name);
}
ce->constructor = fe; fe->common.fn_flags |= ZEND_ACC_CTOR;
- }
- else if (!strncmp(mname, ZEND_DESTRUCTOR_FUNC_NAME, mname_len)) { ce->destructor = fe;
fe->common.fn_flags |= ZEND_ACC_DTOR; }
- else if (!strncmp(mname, ZEND_GET_FUNC_NAME, mname_len)) ce->__get = fe;
- else if (!strncmp(mname, ZEND_SET_FUNC_NAME, mname_len)) ce->__set = fe;
- else if (!strncmp(mname, ZEND_CALL_FUNC_NAME, mname_len)) ce->__call = fe;
- else if (!strncmp(mname, ZEND_UNSET_FUNC_NAME, mname_len)) ce->__unset = fe;
- else if (!strncmp(mname, ZEND_ISSET_FUNC_NAME, mname_len)) ce->__isset = fe;
- else if (!strncmp(mname, ZEND_CALLSTATIC_FUNC_NAME, mname_len)) ce->__callstatic= fe;
- else if (!strncmp(mname, ZEND_TOSTRING_FUNC_NAME, mname_len)) ce->__tostring = fe;
- else if (ce->name_length + 1 == mname_len) {
+ } else if (!strncmp(mname, ZEND_DESTRUCTOR_FUNC_NAME, mname_len)) {
+ ce->destructor = fe; fe->common.fn_flags |= ZEND_ACC_DTOR;
+ } else if (!strncmp(mname, ZEND_GET_FUNC_NAME, mname_len)) {
+ ce->__get = fe;
+ } else if (!strncmp(mname, ZEND_SET_FUNC_NAME, mname_len)) {
+ ce->__set = fe;
+ } else if (!strncmp(mname, ZEND_CALL_FUNC_NAME, mname_len)) {
+ ce->__call = fe;
+ } else if (!strncmp(mname, ZEND_UNSET_FUNC_NAME, mname_len)) {
+ ce->__unset = fe;
+ } else if (!strncmp(mname, ZEND_ISSET_FUNC_NAME, mname_len)) {
+ ce->__isset = fe;
+ } else if (!strncmp(mname, ZEND_CALLSTATIC_FUNC_NAME, mname_len)) {
+ ce->__callstatic = fe;
+ } else if (!strncmp(mname, ZEND_TOSTRING_FUNC_NAME, mname_len)) {
+ ce->__tostring = fe;
+ } else if (ce->name_length + 1 == mname_len) {
char *lowercase_name = emalloc(ce->name_length + 1);
zend_str_tolower_copy(lowercase_name, ce->name, ce->name_length);
lowercase_name = (char*)zend_new_interned_string(lowercase_name, ce->name_length + 1, 1
TSRMLS_CC);
@@ -4335,8 +4340,7 @@
"An alias (%s) was defined for method %s(), but this method does not exist",
cur_alias->alias,
cur_alias->trait_method->method_name);
- }
- else {
+ } else {
/** Here are two possible cases:
1) this is an attempt to modifiy the visibility
of a method introduce as part of another alias.
@@ -4354,8 +4358,7 @@
zend_error(E_COMPILE_ERROR,
"The modifiers for the trait alias %s() need to be changed in the same statment in
which the alias is defined. Error",
cur_alias->trait_method->method_name);
- }
- else {
+ } else {
efree(lc_method_name);
zend_error(E_COMPILE_ERROR,
"The modifiers of the trait method %s() are changed, but this method does not
exist. Error",