Index: trunk/processor/processor.m4
===================================================================
--- trunk/processor/processor.m4	(revision 822)
+++ trunk/processor/processor.m4	(revision 825)
@@ -3,4 +3,5 @@
 DECL_STRUCT_P_FUNC(`zval')
 DECL_STRUCT_P_FUNC(`zval_ptr')
+DECL_STRUCT_P_FUNC(`zval_ptr_nullable')
 DECL_STRUCT_P_FUNC(`zend_op_array')
 DECL_STRUCT_P_FUNC(`zend_class_entry')
@@ -65,4 +66,5 @@
 dnl }}}
 DEF_HASH_TABLE_FUNC(`HashTable_zval_ptr',           `zval_ptr')
+DEF_HASH_TABLE_FUNC(`HashTable_zval_ptr_nullable',  `zval_ptr_nullable')
 DEF_HASH_TABLE_FUNC(`HashTable_zend_function',      `zend_function')
 #ifdef ZEND_ENGINE_2
@@ -215,4 +217,14 @@
 ')
 dnl }}}
+DEF_STRUCT_P_FUNC(`zval_ptr_nullable', , `dnl {{{
+	if (src[0]) {
+		STRUCT_P_EX(zval_ptr, dst, src, `', `', ` ')
+	}
+	else {
+		IFCOPY(`COPYNULL_EX(src[0], src)')
+	}
+	DONE_SIZE(sizeof(zval_ptr_nullable))
+')
+dnl }}}
 dnl {{{ zend_arg_info
 #ifdef ZEND_ENGINE_2
@@ -328,7 +340,7 @@
 #ifdef ZEND_ENGINE_2_4
 	DISPATCH(int, default_properties_count)
-	STRUCT_ARRAY(default_properties_count, zval_ptr, default_properties_table)
+	STRUCT_ARRAY(default_properties_count, zval_ptr_nullable, default_properties_table)
 	DISPATCH(int, default_static_members_count)
-	STRUCT_ARRAY(default_static_members_count, zval_ptr, default_static_members_table)
+	STRUCT_ARRAY(default_static_members_count, zval_ptr_nullable, default_static_members_table)
 	IFCOPY(`dst->static_members_table = dst->default_static_members_table;')
 	DONE(static_members_table)
@@ -355,19 +367,21 @@
 			CALLOC(dst->interfaces, zend_class_entry*, src->num_interfaces)
 			DONE(`interfaces')
+		}
+		else {
+			COPYNULL(`interfaces')
+		}
 #	ifdef ZEND_ENGINE_2_4
+		if (src->num_traits) {
 			CALLOC(dst->traits, zend_class_entry*, src->num_traits)
 			DONE(`traits')
 			DONE(`trait_aliases')
 			DONE(`trait_precedences')
-#	endif
 		}
 		else {
-			COPYNULL(`interfaces')
-#	ifdef ZEND_ENGINE_2_4
 			COPYNULL(`traits')
 			COPYNULL(`trait_aliases')
 			COPYNULL(`trait_precedences')
+		}
 #	endif
-		}
 	')
 	IFDASM(`
@@ -386,18 +400,20 @@
 			*/
 			DONE(`interfaces')
+		}
+		else {
+			COPYNULL(`interfaces')
+		}
 #	ifdef ZEND_ENGINE_2_4
+		if (src->num_traits) {
 			DONE(`traits')
 			DONE(`trait_aliases')
 			DONE(`trait_precedences')
-#	endif
 		}
 		else {
-			COPYNULL(`interfaces')
-#	ifdef ZEND_ENGINE_2_4
 			COPYNULL(`traits')
 			COPYNULL(`trait_aliases')
 			COPYNULL(`trait_precedences')
+		}
 #	endif
-		}
 	')
 	IFRESTORE(`', `
