Index: /trunk/processor/head.m4
===================================================================
--- /trunk/processor/head.m4	(revision 198)
+++ /trunk/processor/head.m4	(revision 199)
@@ -249,5 +249,5 @@
 static int xc_hash_static_member_check(xc_processor_t *processor, Bucket *b TSRMLS_DC) /* {{{ */
 {
-	zend_class_entry *src = processor->active_class_entry_src;
+	const zend_class_entry *src = processor->active_class_entry_src;
 	if (src->parent) {
 		zval **srczv;
@@ -265,31 +265,14 @@
 static void inherit_static_prop(zval **p) /* {{{ */
 {
+	/* already set */
+#if 0
 	(*p)->refcount++;
 	(*p)->is_ref = 1;
+#endif
 }
 /* }}} */
 static void xc_fix_static_members(xc_processor_t *processor, zend_class_entry *dst TSRMLS_DC) /* {{{ */
 {
-	zend_class_entry *parent_ce = dst->parent;
-	if (parent_ce->type != dst->type) {
-		/* User class extends internal class */
-		zend_update_class_constants(parent_ce  TSRMLS_CC);
-		zend_hash_merge(&dst->default_static_members, CE_STATIC_MEMBERS(parent_ce), (void (*)(void *)) inherit_static_prop, NULL, sizeof(zval *), 0);
-	}
-	else {
-		zend_hash_merge(&dst->default_static_members, &parent_ce->default_static_members, (void (*)(void *)) inherit_static_prop, NULL, sizeof(zval *), 0);
-	}
-
-	/*
-	HashPosition pos;
-	HashTable *pmembers = CE_STATIC_MEMBERS(dst->parent);
-	zval **zv;
-	for (zend_hash_internal_pointer_reset_ex(pmembers, &pos);
-			zend_hash_get_current_data_ex(pmembers, (void **) &zv, &pos) == SUCCESS;
-			zend_hash_move_forward_ex(pmembers, &pos)) {
-			if (zend_hash_quick_find(parent->static_members, p->arKey, p->nKeyLength, p->h, &pprop.ptr) == SUCCESS) {
-			}
-	}
-	*/
+	zend_hash_merge(&dst->default_static_members, &dst->parent->default_static_members, (void (*)(void *)) inherit_static_prop, NULL, sizeof(zval *), 0);
 }
 /* }}} */
Index: /trunk/processor/processor.m4
===================================================================
--- /trunk/processor/processor.m4	(revision 198)
+++ /trunk/processor/processor.m4	(revision 199)
@@ -265,7 +265,7 @@
 dnl }}}
 DEF_STRUCT_P_FUNC(`zend_class_entry', , `dnl {{{
-	IFCOPY(`
+	IFCALCCOPY(`
 		processor->active_class_entry_src = src;
-		processor->active_class_entry_dst = dst;
+		IFCOPY(`processor->active_class_entry_dst = dst;')
 	')
 	DISPATCH(char, type)
@@ -298,10 +298,10 @@
 	STRUCT(HashTable, properties_info, HashTable_zend_property_info)
 #	ifdef ZEND_ENGINE_2_1
-	STRUCT(HashTable, default_static_members, IFSTORE(HashTable_zval_ptr_static_member_check, HashTable_zval_ptr))
+	STRUCT(HashTable, default_static_members, IFCALCSTORE(HashTable_zval_ptr_static_member_check, HashTable_zval_ptr))
 	IFCOPY(`dst->static_members = &dst->default_static_members;')
 	IFRESTORE(`if (dst->parent) xc_fix_static_members(processor, dst TSRMLS_CC);')
 	DONE(static_members)
 #	else
-	STRUCT_P(HashTable, static_members, IFSTORE(HashTable_zval_ptr_static_member_check, HashTable_zval_ptr))
+	STRUCT_P(HashTable, static_members, IFCALCSTORE(HashTable_zval_ptr_static_member_check, HashTable_zval_ptr))
 #	endif
 	STRUCT(HashTable, constants_table, HashTable_zval_ptr)
@@ -384,7 +384,7 @@
 	STRUCT(HashTable, function_table, HashTable_zend_function)
 	IFRESTORE(`dst->function_table.pDestructor = ZEND_FUNCTION_DTOR;')
-	IFCOPY(`
+	IFCALCCOPY(`
 		processor->active_class_entry_src = NULL;
-		processor->active_class_entry_dst = NULL;
+		IFCOPY(`processor->active_class_entry_dst = NULL;')
 	')
 ')
