felipe Mon, 20 Dec 2010 01:42:25 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=306479
Log:
- Fix build
Changed paths:
U php/php-src/trunk/Zend/zend_compile.c
Modified: php/php-src/trunk/Zend/zend_compile.c
===================================================================
--- php/php-src/trunk/Zend/zend_compile.c 2010-12-20 01:35:53 UTC (rev
306478)
+++ php/php-src/trunk/Zend/zend_compile.c 2010-12-20 01:42:25 UTC (rev
306479)
@@ -3876,17 +3876,16 @@
static void zend_do_traits_property_binding(zend_class_entry *ce TSRMLS_DC) /*
{{{ */
{
- //HashTable* resulting_table;
+ /* HashTable* resulting_table; */
size_t i;
zend_property_info *property_info;
zend_property_info *coliding_prop;
zval compare_result;
char* prop_name;
int prop_name_length;
-
char* class_name_unused;
- bool prop_found;
- bool not_compatible;
+ zend_bool prop_found;
+ zend_bool not_compatible;
zval* prop_value;
@@ -3911,8 +3910,7 @@
prop_found =
zend_hash_quick_find(&ce->properties_info,
property_info->name, property_info->name_length+1,
property_info->h, (void **) &coliding_prop) == SUCCESS;
- }
- else {
+ } else {
/* for private and protected we need to
unmangle the names */
zend_unmangle_property_name(property_info->name, property_info->name_length,
&class_name_unused, &prop_name);
@@ -3932,16 +3930,14 @@
not_compatible =
compare_function(&compare_result,
ce->default_static_members_table[coliding_prop->offset],
ce->traits[i]->default_static_members_table[property_info->offset] TSRMLS_CC)
== FAILURE;
- }
- else {
+ } else {
not_compatible =
compare_function(&compare_result,
ce->default_properties_table[coliding_prop->offset],
ce->traits[i]->default_properties_table[property_info->offset] TSRMLS_CC) ==
FAILURE;
}
- }
- else {
+ } else {
/* the flags are not identical, thus,
we assume properties are not compatible */
- not_compatible = true;
+ not_compatible = 1;
}
if (not_compatible) {
@@ -3951,8 +3947,7 @@
property_info->ce->name,
prop_name,
ce->name);
- }
- else {
+ } else {
zend_error(E_STRICT,
"%s and %s define
the same property ($%s) in the composition of %s. This might be incompatible,
to improve maintainability consider using accessor methods in traits instead.
Class was composed",
find_first_definition(ce, i, prop_name, prop_name_length,
coliding_prop->ce)->name,
@@ -3965,12 +3960,10 @@
/* property not found, so lets add it */
if (property_info->flags & ZEND_ACC_STATIC) {
prop_value =
ce->traits[i]->default_static_members_table[property_info->offset];
- }
- else {
+ } else {
prop_value =
ce->traits[i]->default_properties_table[property_info->offset];
}
-
zend_declare_property_ex(ce, prop_name,
prop_name_length,
prop_value, property_info->flags,
property_info->doc_comment, property_info->doc_comment_len TSRMLS_CC);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php