Index: unk/processor/dispatch.m4
===================================================================
--- /trunk/processor/dispatch.m4	(revision 842)
+++ 	(revision )
@@ -1,58 +1,0 @@
-dnl DISPATCH(1:type, 2:elm)
-define(`DISPATCH', `
-	DBG(`$0($*)')
-	assert(sizeof($1) == sizeof(src->$2));
-	ifelse(
-		`$1', `zend_bool',        `PROC_INT(`$2', `u',  `$1')'
-	, `$1', `zend_uchar',       `PROC_INT(`$2', `u',  `$1')'
-	, `$1', `char',             `PROC_INT(`$2', `d',  `$1')'
-	, `$1', `int32_t',          `PROC_INT(`$2', `d',  `$1')'
-	, `$1', `unsigned char',    `PROC_INT(`$2', `u',  `$1')'
-	, `$1', `zend_uint',        `PROC_INT(`$2', `u',  `$1')'
-	, `$1', `uint',             `PROC_INT(`$2', `u',  `$1')'
-	, `$1', `unsigned int',     `PROC_INT(`$2', `u',  `$1')'
-	, `$1', `zend_ulong',       `PROC_INT(`$2', `lu', `$1')'
-	, `$1', `ulong',            `PROC_INT(`$2', `lu', `$1')'
-	, `$1', `size_t',           `PROC_INT(`$2', `u', `$1')'
-	, `$1', `long',             `PROC_INT(`$2', `ld', `$1')'
-	, `$1', `time_t',           `PROC_INT(`$2', `ld', `$1')'
-	, `$1', `zend_ushort',      `PROC_INT(`$2', `hu', `$1')'
-	, `$1', `int',              `PROC_INT(`$2', `d',  `$1')'
-	, `$1', `double',           `PROC_INT(`$2', `f',  `$1')'
-	, `$1', `opcode_handler_t', `/* is copying enough? */COPY(`$2')'
-	, `$1', `zval_data_type',   `PROC_INT(`$2', `u',  `$1')'
-	, `$1', `xc_entry_type_t',  `PROC_INT(`$2', `d',  `$1')'
-	, `$1', `xc_hash_value_t',  `PROC_INT(`$2', `lu', `$1')'
-	, `$1', `xc_md5sum_t',      `COPY(`$2')'
-	, `', `', `m4_errprint(`Unknown type "$1"')'
-	)
-')
-dnl {{{ DISPATCH_ARRAY(1:count, 2:type, 3:elm)
-define(`DISPATCH_ARRAY', `
-	if (src->$3) {
-		int i;
-		IFDASM(`
-			zval *arr;
-			ALLOC_INIT_ZVAL(arr);
-			array_init(arr);
-			for (i = 0; i < src->$1; i ++) {
-				ifelse(
-					`$2', `zend_bool', `add_assoc_bool_ex(arr, ZEND_STRS("$3"), src->$3[i] ? 1 : 0);'
-				, `', `', `add_next_index_long(arr, src->$3[i]);')
-			}
-			add_assoc_zval_ex(dst, ZEND_STRS("$3"), arr);
-		', `
-			COPY_N_EX($@)
-			for (i = 0; i < src->$1; i ++) {
-				DISABLECHECK(`
-					DISPATCH(`$2', `$3[i]', `$4')
-				')
-			}
-		')dnl IFDASM
-		DONE(`$3')
-	}
-	else {
-		COPYNULL(`$3')
-	}
-')
-dnl }}}
Index: /trunk/processor/hashtable.m4
===================================================================
--- /trunk/processor/hashtable.m4	(revision 842)
+++ /trunk/processor/hashtable.m4	(revision 843)
@@ -78,12 +78,12 @@
 			IFRESTORE(`dst->canary = zend_hash_canary; DONE(canary)', `
 				dnl else
-				DISPATCH(unsigned int, canary)
+				PROCESS(unsigned int, canary)
 			')
 		')
 #endif
-		DISPATCH(uint, nTableSize)
-		DISPATCH(uint, nTableMask)
-		DISPATCH(uint, nNumOfElements)
-		DISPATCH(ulong, nNextFreeElement)
+		PROCESS(uint, nTableSize)
+		PROCESS(uint, nTableMask)
+		PROCESS(uint, nNumOfElements)
+		PROCESS(ulong, nNextFreeElement)
 		IFCOPY(`dst->pInternalPointer = NULL;	/* Used for element traversal */') DONE(pInternalPointer)
 		IFCOPY(`dst->pListHead = NULL;') DONE(pListHead)
@@ -165,12 +165,12 @@
 		IFCOPY(`dst->pListTail = pnew;') DONE(pListTail)
 		IFCOPY(`dst->pDestructor = src->pDestructor;') DONE(pDestructor)
-		DISPATCH(zend_bool, persistent)
+		PROCESS(zend_bool, persistent)
 #ifdef IS_UNICODE
-		DISPATCH(zend_bool, unicode)
+		PROCESS(zend_bool, unicode)
 #endif
-		DISPATCH(unsigned char, nApplyCount)
-		DISPATCH(zend_bool, bApplyProtection)
+		PROCESS(unsigned char, nApplyCount)
+		PROCESS(zend_bool, bApplyProtection)
 #if ZEND_DEBUG
-		DISPATCH(int, inconsistent)
+		PROCESS(int, inconsistent)
 #endif
 		')dnl IFDASM
Index: /trunk/processor/head.m4
===================================================================
--- /trunk/processor/head.m4	(revision 842)
+++ /trunk/processor/head.m4	(revision 843)
@@ -37,4 +37,6 @@
 define(`SIZEOF_xc_entry_name_t', `sizeof(xc_entry_name_t)')
 define(`COUNTOF_xc_entry_name_t', `1')
+define(`SIZEOF_xc_ztstring', `sizeof(xc_ztstring)')
+define(`COUNTOF_xc_ztstring', `1')
 
 ifdef(`XCACHE_ENABLE_TEST', `
@@ -56,4 +58,5 @@
 typedef zval *zval_ptr;
 typedef zval *zval_ptr_nullable;
+typedef char *xc_ztstring;
 #ifdef ZEND_ENGINE_2_4
 typedef zend_trait_alias *zend_trait_alias_ptr;
@@ -61,5 +64,7 @@
 #endif
 
-typedef zend_uchar zval_data_type;
+typedef zend_uchar xc_zval_data_type;
+typedef int xc_op_type;
+typedef zend_uchar xc_opcode;
 #ifdef IS_UNICODE
 typedef UChar zstr_uchar;
Index: /trunk/processor/main.m4
===================================================================
--- /trunk/processor/main.m4	(revision 842)
+++ /trunk/processor/main.m4	(revision 843)
@@ -20,4 +20,6 @@
 define(`ZEND_STRS', `($1), (sizeof($1))')
 define(`ZEND_STRL', `($1), (sizeof($1) - 1)')
+define(`DST', `dst->$1')
+define(`SRC', `src->$1')
 dnl ============
 define(`INDENT', `xc_dprint_indent(indent);')
@@ -81,29 +83,9 @@
 	popdef(`SIZE')
 ')
-dnl CALLOC(1:dst, 2:type [, 3:count=1 ])
-define(`CALLOC', `ALLOC(`$1', `$2', `$3', `1')')
-dnl }}}
-dnl {{{ PROC_INT(1:elm, 2:format=%d, 3:type=, 4:spec=)
-define(`PROC_INT', `
-	IFNOTMEMCPY(`IFCOPY(`dst->$1 = src->$1;')')
-	IFDPRINT(`
-		INDENT()
-		ifelse(
-			`$3 $1', `zval_data_type type', `fprintf(stderr, "$3:$1:\t%d %s\n", src->$1, xc_get_data_type(src->$1));'
-		, `$3 $1', `int op_type', `fprintf(stderr, "$3:$1:\t%d %s\n", src->$1, xc_get_op_type(src->$1));'
-		, `$3 $1', `zend_uchar opcode', `fprintf(stderr, "$3:$1:\t%d %s\n", src->$1, xc_get_opcode(src->$1));'
-		, `', `', `fprintf(stderr, "$3:$1:\t%ifelse(`$2',`',`d',`$2')\n", src->$1);')
-	')
-	IFDASM(`
-		ifelse(
-			`$3', `zend_bool', `add_assoc_bool_ex(dst, ZEND_STRS("$1"), src->$1 ? 1 : 0);'
-		, `', `', `add_assoc_long_ex(dst, ZEND_STRS("$1"), src->$1);'
-		)
-	')
-	DONE(`$1')
-')
+dnl CALLOC(1:dst, 2:type [, 3:count=1, 4:forcetype=$2 ])
+define(`CALLOC', `ALLOC(`$1', `$2', `$3', `1', `$4')')
 dnl }}}
 dnl {{{ PROC_CLASS_ENTRY_P(1:elm)
-define(`PROC_CLASS_ENTRY_P', `PROC_CLASS_ENTRY_P_EX(`dst->$1', `src->$1', `$1')`'DONE(`$1')')
+define(`PROC_CLASS_ENTRY_P', `PROC_CLASS_ENTRY_P_EX(`dst->$1', `SRC(`$1')', `$1')`'DONE(`$1')')
 dnl PROC_CLASS_ENTRY_P_EX(1:dst, 2:src, 3:elm-name)
 define(`PROC_CLASS_ENTRY_P_EX', `
@@ -151,11 +133,11 @@
 dnl }}}
 dnl {{{ COPY
-define(`COPY', `IFNOTMEMCPY(`IFCOPY(`dst->$1 = src->$1;')')DONE(`$1')')
+define(`COPY', `IFNOTMEMCPY(`IFCOPY(`dst->$1 = SRC(`$1');')')DONE(`$1')')
 dnl }}}
 dnl {{{ COPY_N_EX
 define(`COPY_N_EX', `
-	ALLOC(`dst->$3', `$2', `src->$1')
+	ALLOC(`dst->$3', `$2', `SRC(`$1')')
 	IFCOPY(`
-		memcpy(dst->$3, src->$3, sizeof(dst->$3[0]) * src->$1);
+		memcpy(dst->$3, SRC(`$3'), sizeof(dst->$3[0]) * SRC(`$1'));
 		')
 ')
@@ -168,5 +150,5 @@
 dnl }}}
 dnl {{{ COPYARRAY_EX
-define(`COPYARRAY_EX', `IFNOTMEMCPY(`IFCOPY(`memcpy(dst->$1, src->$1, sizeof(dst->$1));')')')
+define(`COPYARRAY_EX', `IFNOTMEMCPY(`IFCOPY(`memcpy(dst->$1, SRC(`$1'), sizeof(dst->$1));')')')
 dnl }}}
 dnl {{{ COPYARRAY
@@ -226,5 +208,5 @@
 		}
 	')
-	DONE_SIZE(`sizeof(src->$1)')
+	DONE_SIZE(`sizeof(SRC(`$1'))')
 ')
 define(`DISABLECHECK', `
@@ -261,5 +243,5 @@
 include(srcdir`/processor/string.m4')
 include(srcdir`/processor/struct.m4')
-include(srcdir`/processor/dispatch.m4')
+include(srcdir`/processor/process.m4')
 include(srcdir`/processor/head.m4')
 
Index: /trunk/processor/process.m4
===================================================================
--- /trunk/processor/process.m4	(revision 843)
+++ /trunk/processor/process.m4	(revision 843)
@@ -0,0 +1,142 @@
+define(`PROCESS_SCALAR', `dnl {{{ (1:elm, 2:format=%d, 3:type=)
+	IFNOTMEMCPY(`IFCOPY(`DST(`$1') = SRC(`$1');')')
+	IFDPRINT(`
+		INDENT()
+		fprintf(stderr, "$3:$1:\t%ifelse(`$2',`',`d',`$2')\n", SRC(`$1'));
+	')
+	IFDASM(`
+		ifelse(
+			`$3', `zend_bool', `add_assoc_bool_ex(dst, ZEND_STRS("$1"), SRC(`$1') ? 1 : 0);'
+		, `', `', `add_assoc_long_ex(dst, ZEND_STRS("$1"), SRC(`$1'));'
+		)
+	')
+	DONE(`$1')
+')
+dnl }}}
+define(`PROCESS_xc_ztstring', `dnl {{{ (1:elm)
+	PROC_STRING(`$1')
+')
+dnl }}}
+define(`PROCESS_zval_data_type', `dnl {{{ (1:elm)
+	IFDPRINT(`
+		INDENT()
+		fprintf(stderr, ":$1:\t%d %s\n", SRC(`$1'), xc_get_data_type(SRC(`$1')));
+		DONE(`$1')
+	', `PROCESS_SCALAR(`$1')')
+')
+dnl }}}
+define(`PROCESS_op_type', `dnl {{{ (1:elm)
+	IFDPRINT(`
+		INDENT()
+		fprintf(stderr, ":$1:\t%d %s\n", SRC(`$1'), xc_get_op_type(SRC(`$1')));
+		DONE(`$1')
+	', `PROCESS_SCALAR(`$1')')
+')
+dnl }}}
+define(`PROCESS_opcode', `dnl {{{ (1:elm)
+	IFDPRINT(`
+		INDENT()
+		fprintf(stderr, ":$1:\t%u %s\n", SRC(`$1'), xc_get_opcode(SRC(`$1')));
+		DONE(`$1')
+	', `PROCESS_SCALAR(`$1')')
+')
+dnl }}}
+define(`PROCESS', `dnl PROCESS(1:type, 2:elm)
+	DBG(`$0($*)')
+	assert(sizeof($1) == sizeof(SRC(`$2')));
+	ifelse(
+		`$1', `zend_bool',        `PROCESS_SCALAR(`$2', `u',  `$1')'
+	, `$1', `zend_uchar',       `PROCESS_SCALAR(`$2', `u',  `$1')'
+	, `$1', `char',             `PROCESS_SCALAR(`$2', `d',  `$1')'
+	, `$1', `int32_t',          `PROCESS_SCALAR(`$2', `d',  `$1')'
+	, `$1', `unsigned char',    `PROCESS_SCALAR(`$2', `u',  `$1')'
+	, `$1', `zend_uint',        `PROCESS_SCALAR(`$2', `u',  `$1')'
+	, `$1', `uint',             `PROCESS_SCALAR(`$2', `u',  `$1')'
+	, `$1', `unsigned int',     `PROCESS_SCALAR(`$2', `u',  `$1')'
+	, `$1', `zend_ulong',       `PROCESS_SCALAR(`$2', `lu', `$1')'
+	, `$1', `ulong',            `PROCESS_SCALAR(`$2', `lu', `$1')'
+	, `$1', `size_t',           `PROCESS_SCALAR(`$2', `u', `$1')'
+	, `$1', `long',             `PROCESS_SCALAR(`$2', `ld', `$1')'
+	, `$1', `time_t',           `PROCESS_SCALAR(`$2', `ld', `$1')'
+	, `$1', `zend_ushort',      `PROCESS_SCALAR(`$2', `hu', `$1')'
+	, `$1', `int',              `PROCESS_SCALAR(`$2', `d',  `$1')'
+	, `$1', `double',           `PROCESS_SCALAR(`$2', `f',  `$1')'
+	, `$1', `xc_entry_type_t',  `PROCESS_SCALAR(`$2', `d',  `$1')'
+	, `$1', `xc_hash_value_t',  `PROCESS_SCALAR(`$2', `lu', `$1')'
+
+	, `$1', `xc_ztstring',       `PROCESS_xc_ztstring(`$2')'
+	, `$1', `xc_zval_data_type', `PROCESS_zval_data_type(`$2')'
+	, `$1', `xc_op_type',        `PROCESS_op_type(`$2')'
+	, `$1', `xc_opcode',         `PROCESS_opcode(`$2')'
+	, `$1', `opcode_handler_t',  `/* is copying enough? */COPY(`$2')'
+	, `$1', `xc_md5sum_t',       `COPY(`$2')'
+	, `', `', `m4_errprint(`AUTOCHECK ERROR: Unknown type "$1"')define(`EXIT_PENDING', 1)'
+	)
+')
+define(`PROCESS_ARRAY', `dnl {{{ (1:count, 2:type, 3:elm, [4:force_type])
+	if (src->$3) {
+		int LOOPCOUNTER;
+		IFDASM(`
+			zval *arr;
+			ALLOC_INIT_ZVAL(arr);
+			array_init(arr);
+
+			for (LOOPCOUNTER = 0;
+					ifelse(`$1', `', `src->$3[LOOPCOUNTER]',
+					`', `', `LOOPCOUNTER < SRC(`$1')');
+					++LOOPCOUNTER) {
+				pushdef(`dst', `arr')
+				pushdef(`SRC', defn(`SRC') `[LOOPCOUNTER]')
+				popdef(`add_assoc_bool_ex', `add_next_index_bool($1, $3)')
+				popdef(`add_assoc_string_ex', `add_next_index_string($1, $3)')
+				popdef(`add_assoc_long_ex', `add_next_index_long($1, $3)')
+				popdef(`add_assoc_zval_ex', `add_next_index_zval($1, $3)')
+				DISABLECHECK(`
+					PROCESS(`$2', `$3')
+				')
+				popdef(`add_assoc_zval_ex')
+				popdef(`add_assoc_long_ex')
+				popdef(`add_assoc_string_ex')
+				popdef(`add_assoc_bool_ex')
+				popdef(`SRC')
+				popdef(`dst')
+
+				++LOOPCOUNTER;
+			}
+			add_assoc_zval_ex(dst, ZEND_STRS("$3"), arr);
+		', `
+			dnl find count with NULL
+			ifelse(`$1', `', `
+				size_t count = 0;
+				while (SRC(`$3[count]')) {
+					++count;
+				}
+				++count;
+				pushdef(`STRUCT_COUNT', `count')
+			',
+			`', `', `pushdef(`STRUCT_COUNT', `SRC(`$1')')')
+			ALLOC(`dst->$3', `$2', `STRUCT_COUNT', , `$4')
+			popdef(`STRUCT_COUNT')
+
+			for (LOOPCOUNTER = 0;
+					ifelse(`$1', `', `src->$3[LOOPCOUNTER]',
+					`', `', `LOOPCOUNTER < SRC(`$1')');
+					++LOOPCOUNTER) {
+				DISABLECHECK(`
+					pushdef(`DST', defn(`DST') `[LOOPCOUNTER]')
+					pushdef(`SRC', ((const char **) defn(`SRC'))`[LOOPCOUNTER]')
+					PROCESS(`$2', `$3')
+					popdef(`SRC')
+					popdef(`DST')
+				')
+			}
+			dnl the end marker
+			ifelse(`$1', `', `IFCOPY(`DST(`$3[LOOPCOUNTER]') = NULL;')')
+		')dnl IFDASM
+		DONE(`$3')
+	}
+	else {
+		COPYNULL(`$3')
+	}
+')
+dnl }}}
Index: /trunk/processor/processor.m4
===================================================================
--- /trunk/processor/processor.m4	(revision 842)
+++ /trunk/processor/processor.m4	(revision 843)
@@ -18,7 +18,7 @@
 #ifdef IS_CV
 DEF_STRUCT_P_FUNC(`zend_compiled_variable', , `dnl {{{
-	DISPATCH(int, name_len)
+	PROCESS(int, name_len)
 	PROC_ZSTRING_L(, name, name_len)
-	DISPATCH(ulong, hash_value)
+	PROCESS(ulong, hash_value)
 ')
 dnl }}}
@@ -46,6 +46,6 @@
 #ifdef ZEND_ENGINE_2
 DEF_STRUCT_P_FUNC(`zend_try_catch_element', , `dnl {{{
-	DISPATCH(zend_uint, try_op)
-	DISPATCH(zend_uint, catch_op)
+	PROCESS(zend_uint, try_op)
+	PROCESS(zend_uint, catch_op)
 ')
 dnl }}}
@@ -53,9 +53,9 @@
 DEF_STRUCT_P_FUNC(`zend_brk_cont_element', , `dnl {{{
 #ifdef ZEND_ENGINE_2_2
-	DISPATCH(int, start)
-#endif
-	DISPATCH(int, cont)
-	DISPATCH(int, brk)
-	DISPATCH(int, parent)
+	PROCESS(int, start)
+#endif
+	PROCESS(int, cont)
+	PROCESS(int, brk)
+	PROCESS(int, parent)
 ')
 dnl }}}
@@ -91,8 +91,8 @@
 			case IS_RESOURCE:
 			case IS_BOOL:
-				DISPATCH(long, value.lval)
+				PROCESS(long, value.lval)
 				break;
 			case IS_DOUBLE:
-				DISPATCH(double, value.dval)
+				PROCESS(double, value.dval)
 				break;
 			case IS_NULL:
@@ -110,5 +110,5 @@
 			case FLAG_IS_BC:
 #endif
-				DISPATCH(int, value.str.len)
+				PROCESS(int, value.str.len)
 				PROC_STRING_L(value.str.val, value.str.len)
 				break;
@@ -116,5 +116,5 @@
 			case IS_UNICODE:
 proc_unicode:
-				DISPATCH(int32_t, value.uni.len)
+				PROCESS(int32_t, value.uni.len)
 				PROC_ZSTRING_L(1, value.uni.val, value.uni.len)
 				break;
@@ -141,17 +141,17 @@
 dnl }}}
 		DONE(value)
-		DISPATCH(zval_data_type, type)
+		PROCESS(xc_zval_data_type, type)
 #ifdef ZEND_ENGINE_2_3
-		DISPATCH(zend_uchar, is_ref__gc)
-#else
-		DISPATCH(zend_uchar, is_ref)
+		PROCESS(zend_uchar, is_ref__gc)
+#else
+		PROCESS(zend_uchar, is_ref)
 #endif
 
 #ifdef ZEND_ENGINE_2_3
-		DISPATCH(zend_uint, refcount__gc)
+		PROCESS(zend_uint, refcount__gc)
 #elif defined(ZEND_ENGINE_2)
-		DISPATCH(zend_uint, refcount)
-#else
-		DISPATCH(zend_ushort, refcount)
+		PROCESS(zend_uint, refcount)
+#else
+		PROCESS(zend_ushort, refcount)
 #endif
 	')dnl IFDASM
@@ -224,18 +224,18 @@
 #ifdef ZEND_ENGINE_2
 DEF_STRUCT_P_FUNC(`zend_arg_info', , `dnl {{{
-	DISPATCH(zend_uint, name_len)
+	PROCESS(zend_uint, name_len)
 	PROC_ZSTRING_L(, name, name_len)
-	DISPATCH(zend_uint, class_name_len)
+	PROCESS(zend_uint, class_name_len)
 	PROC_ZSTRING_L(, class_name, class_name_len)
 #ifdef ZEND_ENGINE_2_4
-	DISPATCH(zend_uchar, type_hint)
-#else
-	DISPATCH(zend_bool, array_type_hint)
-#endif
-	DISPATCH(zend_bool, allow_null)
-	DISPATCH(zend_bool, pass_by_reference)
+	PROCESS(zend_uchar, type_hint)
+#else
+	PROCESS(zend_bool, array_type_hint)
+#endif
+	PROCESS(zend_bool, allow_null)
+	PROCESS(zend_bool, pass_by_reference)
 #ifndef ZEND_ENGINE_2_4
-	DISPATCH(zend_bool, return_reference)
-	DISPATCH(int, required_num_args)
+	PROCESS(zend_bool, return_reference)
+	PROCESS(int, required_num_args)
 #endif
 ')
@@ -245,10 +245,10 @@
 DEF_STRUCT_P_FUNC(`zend_constant', , `dnl {{{
 	STRUCT(zval, value)
-	DISPATCH(int, flags)
-	DISPATCH(uint, name_len)
+	PROCESS(int, flags)
+	PROCESS(uint, name_len)
 	pushdef(`estrndup', `zend_strndup')
 	PROC_ZSTRING_N(, name, name_len)
 	popdef(`estrndup')
-	DISPATCH(int, module_number)
+	PROCESS(int, module_number)
 ')
 dnl }}}
@@ -277,13 +277,13 @@
 #ifdef ZEND_ENGINE_2
 DEF_STRUCT_P_FUNC(`zend_property_info', , `dnl {{{
-	DISPATCH(zend_uint, flags)
-	DISPATCH(int, name_length)
+	PROCESS(zend_uint, flags)
+	PROCESS(int, name_length)
 	PROC_ZSTRING_L(, name, name_length)
-	DISPATCH(ulong, h)
-#ifdef ZEND_ENGINE_2_4
-	DISPATCH(int, offset)
+	PROCESS(ulong, h)
+#ifdef ZEND_ENGINE_2_4
+	PROCESS(int, offset)
 #endif
 #ifdef ZEND_ENGINE_2_1
-	DISPATCH(int, doc_comment_len)
+	PROCESS(int, doc_comment_len)
 	PROC_ZSTRING_L(, doc_comment, doc_comment_len)
 #endif
@@ -297,8 +297,8 @@
 #ifdef ZEND_ENGINE_2_4
 DEF_STRUCT_P_FUNC(`zend_trait_method_reference', , `dnl {{{
-	DISPATCH(unsigned int, mname_len)
+	PROCESS(unsigned int, mname_len)
 	PROC_STRING_L(method_name, mname_len)
 	COPYNULL(ce)
-	DISPATCH(unsigned int, cname_len)
+	PROCESS(unsigned int, cname_len)
 	PROC_STRING_L(class_name, cname_len)
 ')
@@ -306,7 +306,7 @@
 DEF_STRUCT_P_FUNC(`zend_trait_alias', , `dnl {{{
 	STRUCT_P(zend_trait_method_reference, trait_method)
-	DISPATCH(unsigned int, alias_len)
+	PROCESS(unsigned int, alias_len)
 	PROC_STRING_L(alias, alias_len)
-	DISPATCH(zend_uint, modifiers)
+	PROCESS(zend_uint, modifiers)
 	COPYNULL(function)
 ')
@@ -314,6 +314,5 @@
 DEF_STRUCT_P_FUNC(`zend_trait_precedence', , `dnl {{{
 	STRUCT_P(zend_trait_method_reference, trait_method)
-	dnl TODO
-	STRUCT_ARRAY(, xc_class_name_t, exclude_from_classes)
+	PROCESS_ARRAY(, xc_ztstring, exclude_from_classes, zend_class_entry*)
 	COPYNULL(function)
 ')
@@ -351,6 +350,6 @@
 		IFCOPY(`processor->active_class_entry_dst = dst;')
 	')
-	DISPATCH(char, type)
-	DISPATCH(zend_uint, name_length)
+	PROCESS(char, type)
+	PROCESS(zend_uint, name_length)
 	PROC_ZSTRING_L(, name, name_length)
 	IFRESTORE(`
@@ -365,13 +364,13 @@
 	')
 #ifdef ZEND_ENGINE_2
-	DISPATCH(int, refcount)
+	PROCESS(int, refcount)
 #else
 	STRUCT_P(int, refcount)
 #endif
 #ifndef ZEND_ENGINE_2_4
-	DISPATCH(zend_bool, constants_updated)
-#endif
-#ifdef ZEND_ENGINE_2
-	DISPATCH(zend_uint, ce_flags)
+	PROCESS(zend_bool, constants_updated)
+#endif
+#ifdef ZEND_ENGINE_2
+	PROCESS(zend_uint, ce_flags)
 #endif
 
@@ -382,7 +381,7 @@
 #ifdef ZEND_ENGINE_2_4
 	STRUCT_ARRAY(default_properties_count, zval_ptr_nullable, default_properties_table)
-	DISPATCH(int, default_properties_count)
+	PROCESS(int, default_properties_count)
 	STRUCT_ARRAY(default_static_members_count, zval_ptr_nullable, default_static_members_table)
-	DISPATCH(int, default_static_members_count)
+	PROCESS(int, default_static_members_count)
 	IFCOPY(`dst->static_members_table = dst->default_static_members_table;')
 	DONE(static_members_table)
@@ -425,5 +424,5 @@
 		DONE(`interfaces')
 	')
-	DISPATCH(zend_uint, num_interfaces)
+	PROCESS(zend_uint, num_interfaces)
 #endif
 	STRUCT_ARRAY(, zend_trait_alias_ptr, trait_aliases)
@@ -433,7 +432,7 @@
 	DISABLECHECK(`
 	IFRESTORE(`dst->info.user.filename = processor->entry_src->filepath;', `PROC_STRING(info.user.filename)')
-	DISPATCH(zend_uint, info.user.line_start)
-	DISPATCH(zend_uint, info.user.line_end)
-	DISPATCH(zend_uint, info.user.doc_comment_len)
+	PROCESS(zend_uint, info.user.line_start)
+	PROCESS(zend_uint, info.user.line_end)
+	PROCESS(zend_uint, info.user.doc_comment_len)
 	PROC_ZSTRING_L(, info.user.doc_comment, info.user.doc_comment_len)
 	')
@@ -441,8 +440,8 @@
 #	else
 	IFRESTORE(`dst->filename = processor->entry_src->filepath;DONE(filename)', `PROC_STRING(filename)')
-	DISPATCH(zend_uint, line_start)
-	DISPATCH(zend_uint, line_end)
+	PROCESS(zend_uint, line_start)
+	PROCESS(zend_uint, line_end)
 #		ifdef ZEND_ENGINE_2_1
-	DISPATCH(zend_uint, doc_comment_len)
+	PROCESS(zend_uint, doc_comment_len)
 	PROC_ZSTRING_L(, doc_comment, doc_comment_len)
 #		endif
@@ -519,5 +518,5 @@
 		case IS_CONST:
 			ifelse($1, `result', `
-				DISPATCH(zend_uint, $1.constant)
+				PROCESS(zend_uint, $1.constant)
 			', `
 				IFDASM(`{
@@ -532,5 +531,5 @@
 						dst->$1 = src->$1;
 					', `
-						DISPATCH(zend_uint, $1.constant)
+						PROCESS(zend_uint, $1.constant)
 					')
 				')
@@ -546,9 +545,9 @@
 		case IS_TMP_VAR:
 		case IS_CV:
-			DISPATCH(zend_uint, $1.var)
+			PROCESS(zend_uint, $1.var)
 			break;
 		case IS_UNUSED:
-			IFDASM(`DISPATCH(zend_uint, $1.var)')
-			DISPATCH(zend_uint, $1.opline_num)
+			IFDASM(`PROCESS(zend_uint, $1.var)')
+			PROCESS(zend_uint, $1.opline_num)
 			break;
 		')
@@ -560,5 +559,5 @@
 #else
 DEF_STRUCT_P_FUNC(`znode', , `dnl {{{
-	DISPATCH(int, op_type)
+	PROCESS(xc_op_type, op_type)
 
 #ifdef IS_CV
@@ -588,14 +587,14 @@
 		case IS_TMP_VAR:
 		case XCACHE_IS_CV:
-			DISPATCH(zend_uint, u.var)
-			DISPATCH(zend_uint, u.EA.type)
+			PROCESS(zend_uint, u.var)
+			PROCESS(zend_uint, u.EA.type)
 			break;
 		case IS_UNUSED:
-			IFDASM(`DISPATCH(zend_uint, u.var)')
-			DISPATCH(zend_uint, u.opline_num)
+			IFDASM(`PROCESS(zend_uint, u.var)')
+			PROCESS(zend_uint, u.opline_num)
 #ifndef ZEND_ENGINE_2
-			DISPATCH(zend_uint, u.fetch_type)
-#endif
-			DISPATCH(zend_uint, u.EA.type)
+			PROCESS(zend_uint, u.fetch_type)
+#endif
+			PROCESS(zend_uint, u.EA.type)
 			break;
 		')
@@ -611,5 +610,5 @@
 #endif
 DEF_STRUCT_P_FUNC(`zend_op', , `dnl {{{
-	DISPATCH(zend_uchar, opcode)
+	PROCESS(xc_opcode, opcode)
 #ifdef ZEND_ENGINE_2_4
 	IFRESTORE(`', `
@@ -628,11 +627,11 @@
 	STRUCT(znode, op2)
 #endif
-	DISPATCH(ulong, extended_value)
-	DISPATCH(uint, lineno)
+	PROCESS(ulong, extended_value)
+	PROCESS(uint, lineno)
 #ifdef ZEND_ENGINE_2_1
 #ifdef ZEND_ENGINE_2_4
-	DISPATCH(zend_uchar, op1_type)
-	DISPATCH(zend_uchar, op2_type)
-	DISPATCH(zend_uchar, result_type)
+	PROCESS(zend_uchar, op1_type)
+	PROCESS(zend_uchar, op2_type)
+	PROCESS(zend_uchar, result_type)
 #endif
 	IFCOPY(`
@@ -674,5 +673,5 @@
 		}
 	')
-	DISPATCH(opcode_handler_t, handler)
+	PROCESS(opcode_handler_t, handler)
 #endif
 ')
@@ -681,6 +680,6 @@
 DEF_STRUCT_P_FUNC(`zend_literal', , `dnl {{{
 	STRUCT(zval, constant)
-	DISPATCH(zend_ulong, hash_value)
-	DISPATCH(zend_uint,  cache_slot)
+	PROCESS(zend_ulong, hash_value)
+	PROCESS(zend_uint,  cache_slot)
 ')
 dnl }}}
@@ -777,13 +776,13 @@
 
 	/* Common elements */
-	DISPATCH(zend_uchar, type)
+	PROCESS(zend_uchar, type)
 	PROC_ZSTRING(, function_name)
 #ifdef ZEND_ENGINE_2
-	DISPATCH(zend_uint, fn_flags)
+	PROCESS(zend_uint, fn_flags)
 	STRUCT_ARRAY(num_args, zend_arg_info, arg_info)
-	DISPATCH(zend_uint, num_args)
-	DISPATCH(zend_uint, required_num_args)
+	PROCESS(zend_uint, num_args)
+	PROCESS(zend_uint, required_num_args)
 #	ifndef ZEND_ENGINE_2_4
-	DISPATCH(zend_bool, pass_rest_by_reference)
+	PROCESS(zend_bool, pass_rest_by_reference)
 #	endif
 #else
@@ -808,5 +807,5 @@
 #endif
 #ifndef ZEND_ENGINE_2_4
-	DISPATCH(unsigned char, return_reference)
+	PROCESS(unsigned char, return_reference)
 #endif
 	/* END of common elements */
@@ -822,5 +821,5 @@
 	dnl before copying opcodes
 	STRUCT_ARRAY(last_literal, zend_literal, literals)
-	DISPATCH(int, last_literal)
+	PROCESS(int, last_literal)
 #endif
 
@@ -835,14 +834,14 @@
 	STRUCT_ARRAY(last, zend_op, opcodes)
 	popdef(`AFTER_ALLOC')
-	DISPATCH(zend_uint, last)
+	PROCESS(zend_uint, last)
 #ifndef ZEND_ENGINE_2_4
-	IFCOPY(`dst->size = src->last;DONE(size)', `DISPATCH(zend_uint, size)')
+	IFCOPY(`dst->size = src->last;DONE(size)', `PROCESS(zend_uint, size)')
 #endif
 
 #ifdef IS_CV
 	STRUCT_ARRAY(last_var, zend_compiled_variable, vars)
-	DISPATCH(int, last_var)
+	PROCESS(int, last_var)
 #	ifndef ZEND_ENGINE_2_4
-	IFCOPY(`dst->size_var = src->last_var;DONE(size_var)', `DISPATCH(zend_uint, size_var)')
+	IFCOPY(`dst->size_var = src->last_var;DONE(size_var)', `PROCESS(zend_uint, size_var)')
 #	endif
 #else
@@ -853,18 +852,18 @@
 #endif
 
-	DISPATCH(zend_uint, T)
+	PROCESS(zend_uint, T)
 
 	STRUCT_ARRAY(last_brk_cont, zend_brk_cont_element, brk_cont_array)
-	DISPATCH(zend_uint, last_brk_cont)
+	PROCESS(zend_uint, last_brk_cont)
 #ifndef ZEND_ENGINE_2_4
-	DISPATCH(zend_uint, current_brk_cont)
+	PROCESS(zend_uint, current_brk_cont)
 #endif
 #ifndef ZEND_ENGINE_2
-	DISPATCH(zend_bool, uses_globals)
+	PROCESS(zend_bool, uses_globals)
 #endif
 
 #ifdef ZEND_ENGINE_2
 	STRUCT_ARRAY(last_try_catch, zend_try_catch_element, try_catch_array)
-	DISPATCH(int, last_try_catch)
+	PROCESS(int, last_try_catch)
 #endif
 
@@ -873,16 +872,16 @@
 #ifndef ZEND_ENGINE_2_4
 	COPY(start_op)
-	DISPATCH(int, backpatch_count)
+	PROCESS(int, backpatch_count)
 #endif
 #ifdef ZEND_ENGINE_2_3
-	DISPATCH(zend_uint, this_var)
+	PROCESS(zend_uint, this_var)
 #endif
 
 #ifndef ZEND_ENGINE_2_4
-	DISPATCH(zend_bool, done_pass_two)
+	PROCESS(zend_bool, done_pass_two)
 #endif
 	/* 5.0 <= ver < 5.3 */
 #if defined(ZEND_ENGINE_2) && !defined(ZEND_ENGINE_2_3)
-	DISPATCH(zend_bool, uses_this)
+	PROCESS(zend_bool, uses_this)
 #endif
 
@@ -896,11 +895,11 @@
 #endif
 #ifdef ZEND_ENGINE_2
-	DISPATCH(zend_uint, line_start)
-	DISPATCH(zend_uint, line_end)
-	DISPATCH(int, doc_comment_len)
+	PROCESS(zend_uint, line_start)
+	PROCESS(zend_uint, line_end)
+	PROCESS(int, doc_comment_len)
 	PROC_ZSTRING_L(, doc_comment, doc_comment_len)
 #endif
 #ifdef ZEND_COMPILE_DELAYED_BINDING
-	DISPATCH(zend_uint, early_binding);
+	PROCESS(zend_uint, early_binding);
 #endif
 
@@ -908,9 +907,9 @@
 	DONE(reserved)
 #if defined(HARDENING_PATCH) && HARDENING_PATCH
-	DISPATCH(zend_bool, created_by_eval)
+	PROCESS(zend_bool, created_by_eval)
 #endif
 #ifdef ZEND_ENGINE_2_4
 	SETNULL(run_time_cache)
-	DISPATCH(int, last_cache_slot)
+	PROCESS(int, last_cache_slot)
 #endif
 	} while (0);
@@ -967,12 +966,12 @@
 #ifdef HAVE_XCACHE_CONSTANT
 DEF_STRUCT_P_FUNC(`xc_constinfo_t', , `dnl {{{
-	DISPATCH(zend_uint, key_size)
+	PROCESS(zend_uint, key_size)
 #ifdef IS_UNICODE
-	DISPATCH(zend_uchar, type)
+	PROCESS(zend_uchar, type)
 #endif
 	IFRESTORE(`COPY(key)', `
 		PROC_ZSTRING_N(type, key, key_size)
 	')
-	DISPATCH(ulong, h)
+	PROCESS(ulong, h)
 	STRUCT(zend_constant, constant)
 ')
@@ -980,14 +979,14 @@
 #endif
 DEF_STRUCT_P_FUNC(`xc_op_array_info_detail_t', , `dnl {{{
-	DISPATCH(zend_uint, index)
-	DISPATCH(zend_uint, info)
+	PROCESS(zend_uint, index)
+	PROCESS(zend_uint, info)
 ')
 dnl }}}
 DEF_STRUCT_P_FUNC(`xc_op_array_info_t', , `dnl {{{
 #ifdef ZEND_ENGINE_2_4
-	DISPATCH(zend_uint, literalinfo_cnt)
+	PROCESS(zend_uint, literalinfo_cnt)
 	STRUCT_ARRAY(literalinfo_cnt, xc_op_array_info_detail_t, literalinfos)
 #else
-	DISPATCH(zend_uint, oplineinfo_cnt)
+	PROCESS(zend_uint, oplineinfo_cnt)
 	STRUCT_ARRAY(oplineinfo_cnt, xc_op_array_info_detail_t, oplineinfos)
 #endif
@@ -995,12 +994,12 @@
 dnl }}}
 DEF_STRUCT_P_FUNC(`xc_funcinfo_t', , `dnl {{{
-	DISPATCH(zend_uint, key_size)
+	PROCESS(zend_uint, key_size)
 #ifdef IS_UNICODE
-	DISPATCH(zend_uchar, type)
+	PROCESS(zend_uchar, type)
 #endif
 	IFRESTORE(`COPY(key)', `
 		PROC_ZSTRING_N(type, key, key_size)
 	')
-	DISPATCH(ulong, h)
+	PROCESS(ulong, h)
 	IFRESTORE(`COPY(op_array_info)', `
 		STRUCT(xc_op_array_info_t, op_array_info)
@@ -1014,13 +1013,13 @@
 dnl }}}
 DEF_STRUCT_P_FUNC(`xc_classinfo_t', , `dnl {{{
-	DISPATCH(zend_uint, key_size)
+	PROCESS(zend_uint, key_size)
 #ifdef IS_UNICODE
-	DISPATCH(zend_uchar, type)
+	PROCESS(zend_uchar, type)
 #endif
 	IFRESTORE(`COPY(key)', `
 		PROC_ZSTRING_N(type, key, key_size)
 	')
-	DISPATCH(ulong, h)
-	DISPATCH(zend_uint, methodinfo_cnt)
+	PROCESS(ulong, h)
+	PROCESS(zend_uint, methodinfo_cnt)
 	IFRESTORE(`COPY(methodinfos)', `
 		STRUCT_ARRAY(methodinfo_cnt, xc_op_array_info_t, methodinfos)
@@ -1036,5 +1035,5 @@
 #endif
 #ifndef ZEND_COMPILE_DELAYED_BINDING
-	DISPATCH(int, oplineno)
+	PROCESS(int, oplineno)
 #endif
 ')
@@ -1042,12 +1041,12 @@
 #ifdef ZEND_ENGINE_2_1
 DEF_STRUCT_P_FUNC(`xc_autoglobal_t', , `dnl {{{
-	DISPATCH(zend_uint, key_len)
+	PROCESS(zend_uint, key_len)
 #ifdef IS_UNICODE
-	DISPATCH(zend_uchar, type)
+	PROCESS(zend_uchar, type)
 #endif
 	IFRESTORE(`COPY(key)', `
 		PROC_ZSTRING_L(type, key, key_len)
 	')
-	DISPATCH(ulong, h)
+	PROCESS(ulong, h)
 ')
 dnl }}}
@@ -1055,7 +1054,7 @@
 #ifdef E_STRICT
 DEF_STRUCT_P_FUNC(`xc_compilererror_t', , `dnl {{{
-	DISPATCH(int, type)
-	DISPATCH(uint, lineno)
-	DISPATCH(int, error_len)
+	PROCESS(int, type)
+	PROCESS(uint, lineno)
+	PROCESS(int, error_len)
 	PROC_STRING_L(error, error_len)
 ')
@@ -1068,14 +1067,14 @@
 	')
 
-	DISPATCH(xc_hash_value_t, hvalue)
+	PROCESS(xc_hash_value_t, hvalue)
 	/* skip */
 	DONE(next)
 	COPY(cache)
-	DISPATCH(xc_md5sum_t, md5)
-	DISPATCH(zend_ulong, refcount)
-
-	DISPATCH(size_t, sourcesize)
-	DISPATCH(zend_ulong, hits)
-	DISPATCH(size_t, size)
+	PROCESS(xc_md5sum_t, md5)
+	PROCESS(zend_ulong, refcount)
+
+	PROCESS(size_t, sourcesize)
+	PROCESS(zend_ulong, hits)
+	PROCESS(size_t, size)
 
 	IFRESTORE(`COPY(op_array_info)', `
@@ -1089,15 +1088,15 @@
 
 #ifdef HAVE_XCACHE_CONSTANT
-	DISPATCH(zend_uint, constinfo_cnt)
+	PROCESS(zend_uint, constinfo_cnt)
 	STRUCT_ARRAY(constinfo_cnt, xc_constinfo_t, constinfos)
 #endif
 
-	DISPATCH(zend_uint, funcinfo_cnt)
+	PROCESS(zend_uint, funcinfo_cnt)
 	STRUCT_ARRAY(funcinfo_cnt, xc_funcinfo_t, funcinfos)
 
-	DISPATCH(zend_uint, classinfo_cnt)
+	PROCESS(zend_uint, classinfo_cnt)
 	STRUCT_ARRAY(classinfo_cnt, xc_classinfo_t, classinfos, , IFRESTORE(`processor->active_class_index'))
 #ifdef ZEND_ENGINE_2_1
-	DISPATCH(zend_uint, autoglobal_cnt)
+	PROCESS(zend_uint, autoglobal_cnt)
 	IFRESTORE(`
 		COPY(autoglobals)
@@ -1107,5 +1106,5 @@
 #endif
 #ifdef E_STRICT
-	DISPATCH(zend_uint, compilererror_cnt)
+	PROCESS(zend_uint, compilererror_cnt)
 	IFRESTORE(`
 		COPY(compilererrors)
@@ -1115,7 +1114,7 @@
 #endif
 #ifndef ZEND_COMPILE_DELAYED_BINDING
-	DISPATCH(zend_bool, have_early_binding)
-#endif
-	DISPATCH(zend_bool, have_references)
+	PROCESS(zend_bool, have_early_binding)
+#endif
+	PROCESS(zend_bool, have_references)
 ')
 dnl }}}
@@ -1123,26 +1122,26 @@
 	IFDPRINT(`INDENT()`'fprintf(stderr, "zval:value");')
 	STRUCT_P_EX(zval_ptr, dst->value, src->value, `value', `', `&')
-	DISPATCH(zend_bool, have_references)
+	PROCESS(zend_bool, have_references)
 	DONE(value)
 ')
 dnl }}}
 DEF_STRUCT_P_FUNC(`xc_entry_t', , `dnl {{{
-	DISPATCH(xc_entry_type_t, type)
-	DISPATCH(size_t, size)
-
-	DISPATCH(xc_hash_value_t, hvalue)
+	PROCESS(xc_entry_type_t, type)
+	PROCESS(size_t, size)
+
+	PROCESS(xc_hash_value_t, hvalue)
 	COPY(cache)
 	/* skip */
 	DONE(next)
 
-	IFSTORE(`dst->refcount = 0; DONE(refcount)', `DISPATCH(long, refcount)')
-
-	DISPATCH(time_t, ctime)
-	DISPATCH(time_t, atime)
-	DISPATCH(time_t, dtime)
-	DISPATCH(long, ttl)
-	DISPATCH(zend_ulong, hits)
+	IFSTORE(`dst->refcount = 0; DONE(refcount)', `PROCESS(long, refcount)')
+
+	PROCESS(time_t, ctime)
+	PROCESS(time_t, atime)
+	PROCESS(time_t, dtime)
+	PROCESS(long, ttl)
+	PROCESS(zend_ulong, hits)
 #ifdef IS_UNICODE
-	DISPATCH(zend_uchar, name_type)
+	PROCESS(zend_uchar, name_type)
 #endif
 	dnl {{{ name
@@ -1150,11 +1149,11 @@
 #ifdef IS_UNICODE
 		if (src->name_type == IS_UNICODE) {
-			DISPATCH(int32_t, name.ustr.len)
+			PROCESS(int32_t, name.ustr.len)
 		}
 		else {
-			DISPATCH(int, name.str.len)
+			PROCESS(int, name.str.len)
 		}
 #else
-		DISPATCH(int, name.str.len)
+		PROCESS(int, name.str.len)
 #endif
 		IFRESTORE(`COPY(name.str.val)', `
@@ -1186,19 +1185,19 @@
 	DONE(data)
 	dnl }}}
-	DISPATCH(time_t, mtime)
+	PROCESS(time_t, mtime)
 #ifdef HAVE_INODE
-	DISPATCH(int, device)
-	DISPATCH(int, inode)
+	PROCESS(int, device)
+	PROCESS(int, inode)
 #endif
 
 	if (src->type == XC_TYPE_PHP) {
-		DISPATCH(int, filepath_len)
+		PROCESS(int, filepath_len)
 		IFRESTORE(`COPY(filepath)', `PROC_STRING_L(filepath, filepath_len)')
-		DISPATCH(int, dirpath_len)
+		PROCESS(int, dirpath_len)
 		IFRESTORE(`COPY(dirpath)', `PROC_STRING_L(dirpath, dirpath_len)')
 #ifdef IS_UNICODE
-		DISPATCH(int, ufilepath_len)
+		PROCESS(int, ufilepath_len)
 		IFRESTORE(`COPY(ufilepath)', `PROC_USTRING_L(ufilepath, ufilepath_len)')
-		DISPATCH(int, udirpath_len)
+		PROCESS(int, udirpath_len)
 		IFRESTORE(`COPY(udirpath)', `PROC_USTRING_L(udirpath, udirpath_len)')
 #endif
Index: /trunk/processor/string.m4
===================================================================
--- /trunk/processor/string.m4	(revision 842)
+++ /trunk/processor/string.m4	(revision 843)
@@ -87,11 +87,11 @@
 dnl }}}
 dnl PROC_STRING_N(1:name, 2:size, 3:type)
-define(`PROC_STRING_N', `DBG(`$0($*)') DONE(`$1')`'PROC_STRING_N_EX(`dst->$1', `src->$1', `src->$2', `$1', `char')')
-define(`PROC_USTRING_N', `DBG(`$0($*)') DONE(`$1')`'PROC_STRING_N_EX(`dst->$1', `src->$1', `src->$2', `$1', `UChar')')
+define(`PROC_STRING_N', `DBG(`$0($*)') DONE(`$1')`'PROC_STRING_N_EX(`DST(`$1')', `SRC(`$1')', `SRC(`$2')', `$1', `char')')
+define(`PROC_USTRING_N', `DBG(`$0($*)') DONE(`$1')`'PROC_STRING_N_EX(`DST(`$1')', `SRC(`$1')', `SRC(`$2')', `$1', `UChar')')
 
 define(`PROC_STRING_L', `DBG(`$0($*)') PROC_STRING_N(`$1', `$2 + 1')')
 define(`PROC_USTRING_L', `DBG(`$0($*)') PROC_USTRING_N(`$1', `$2 + 1')')
-define(`PROC_STRING',   `DBG(`$0($*)') DONE(`$1')`'PROC_STRING_N_EX(`dst->$1', `src->$1', `strlen(src->$1) + 1', `$1', `char')')
-define(`PROC_USTRING',  `DBG(`$0($*)') DONE(`$1')`'PROC_STRING_N_EX(`dst->$1', `src->$1', `strlen(src->$1) + 1', `$1', `UChar')')
+define(`PROC_STRING',   `DBG(`$0($*)') DONE(`$1')`'PROC_STRING_N_EX(`DST(`$1')', `SRC(`$1')', `strlen(SRC(`$1')) + 1', `$1', `char')')
+define(`PROC_USTRING',  `DBG(`$0($*)') DONE(`$1')`'PROC_STRING_N_EX(`DST(`$1')', `SRC(`$1')', `strlen(SRC(`$1')) + 1', `$1', `UChar')')
 
 dnl {{{ PROC_ZSTRING_N(1:type, 2:name, 3:size, 4:size_type)
@@ -100,21 +100,21 @@
 #ifdef IS_UNICODE
 	pushdef(`NSIZE', ifelse(
-			`$4', `strlen', `UNI_STRLEN (src->$2) + 1',
-			`$4', `len',    `src->$3 + 1',
-			`',   `',       `src->$3',
+			`$4', `strlen', `UNI_STRLEN (SRC(`$2')) + 1',
+			`$4', `len',    `SRC(`$3') + 1',
+			`',   `',       `SRC(`$3')',
 			))
 	DONE(`$2')
-	ifelse(`$1', `1', `PROC_STRING_N_EX(`dst->$2', `src->$2', defn(`NSIZE'), `$2', `zstr_uchar')
+	ifelse(`$1', `1', `PROC_STRING_N_EX(`DST(`$2')', `SRC(`$2')', defn(`NSIZE'), `$2', `zstr_uchar')
 	', `
-		if (ifelse(`$1', `', `UG(unicode)', `src->$1 == IS_UNICODE')) {
-			PROC_STRING_N_EX(`dst->$2', `src->$2', defn(`NSIZE'), `$2', `zstr_uchar')
+		if (ifelse(`$1', `', `UG(unicode)', `SRC(`$1') == IS_UNICODE')) {
+			PROC_STRING_N_EX(`DST(`$2')', `SRC(`$2')', defn(`NSIZE'), `$2', `zstr_uchar')
 		}
 		else {
-			PROC_STRING_N_EX(`dst->$2', `src->$2', defn(`NSIZE'), `$2', `zstr_char')
+			PROC_STRING_N_EX(`DST(`$2')', `SRC(`$2')', defn(`NSIZE'), `$2', `zstr_char')
 		}
 	')
 #else
 	DONE(`$2')
-	PROC_STRING_N_EX(`dst->$2', `src->$2', NSIZE, `$2', `zstr_char')
+	PROC_STRING_N_EX(`DST(`$2')', `SRC(`$2')', NSIZE, `$2', `zstr_char')
 #endif
 	popdef(`NSIZE')
Index: /trunk/processor/struct.m4
===================================================================
--- /trunk/processor/struct.m4	(revision 842)
+++ /trunk/processor/struct.m4	(revision 843)
@@ -128,5 +128,5 @@
 	DBG(`$0($*)')
 	pushdefFUNC_NAME(`$1', `$5')
-	ifdef(`DEFINED_'ifelse(`$5', `', `$1', `$5'), `', `m4_errprint(`Unknown struct "'ifelse(`$5', `', `$1', `$5')`"')')
+	ifdef(`DEFINED_'ifelse(`$5', `', `$1', `$5'), `', `m4_errprint(`AUTOCHECK ERROR: Unknown struct "'ifelse(`$5', `', `$1', `$5')`"')define(`EXIT_PENDING', 1)')
 	assert(sizeof($1) == sizeof(($6 $3)[0]));
 	ifelse(`$6', `', `ALLOC(`$2', `$1')')
@@ -156,7 +156,7 @@
 define(`STRUCT_P', `
 	DBG(`$0($*)')
-	if (src->$2) {
+	if (SRC(`$2')) {
 		IFDPRINT(`INDENT()`'fprintf(stderr, "$1:$2 ");')
-		STRUCT_P_EX(`$1', `dst->$2', `src->$2', `$2', `$3')
+		STRUCT_P_EX(`$1', `dst->$2', `SRC(`$2')', `$2', `$3')
 	}
 	else {
@@ -170,7 +170,7 @@
 define(`STRUCT', `
 	DBG(`$0($*)')
-	assert(sizeof($1) == sizeof(src->$2));
+	assert(sizeof($1) == sizeof(SRC(`$2')));
 	IFDPRINT(`INDENT()`'fprintf(stderr, "$1:$2 ");')
-	STRUCT_P_EX(`$1', `dst->$2', `src->$2', `$2', `$3', `&')
+	STRUCT_P_EX(`$1', `dst->$2', `SRC(`$2')', `$2', `$3', `&')
 	DONE(`$2')
 ')
@@ -178,5 +178,5 @@
 dnl {{{ STRUCT_ARRAY(1:count, 2:type, 3:elm, 4:name=type, 5:loopcounter)
 define(`STRUCT_ARRAY', `
-	if (src->$3) {
+	if (SRC(`$3')) {
 		ifelse(
 			`$5', `', `int i; pushdef(`LOOPCOUNTER', `i')',
@@ -188,17 +188,14 @@
 			array_init(arr);
 
-			LOOPCOUNTER = 0;
-			while (
-			ifelse(`$1', `', `src->$3[LOOPCOUNTER]',
-			`', `', `LOOPCOUNTER < src->$1')
-			) {
+			for (LOOPCOUNTER = 0;
+					ifelse(`$1', `', `SRC(`$3[LOOPCOUNTER]')',
+					`', `', `LOOPCOUNTER < SRC(`$1')');
+					++LOOPCOUNTER) {
 				zval *zv;
 
 				ALLOC_INIT_ZVAL(zv);
 				array_init(zv);
-				FUNC_NAME (zv, &(src->$3[LOOPCOUNTER]) TSRMLS_CC);
+				FUNC_NAME (zv, &(SRC(`$3[LOOPCOUNTER]')) TSRMLS_CC);
 				add_next_index_zval(arr, zv);
-
-				++LOOPCOUNTER;
 			}
 			add_assoc_zval_ex(dst, ZEND_STRS("$3"), arr);
@@ -206,29 +203,27 @@
 			dnl find count with NULL
 			ifelse(`$1', `', `
-				int count;
-				for (count = 0; src->$3[count]; ++count) {
-					/* just count */
+				size_t count = 0;
+				while (SRC(`$3[count]')) {
+					++count;
 				}
 				++count;
-				pushdef(`STRUCT_COUNT', `count')
+				pushdef(`ARRAY_ELEMENT_COUNT', `count')
 			',
-			`', `', `pushdef(`STRUCT_COUNT', `src->$1')')
-			ALLOC(`dst->$3', `$2', `STRUCT_COUNT')
+			`', `', `pushdef(`ARRAY_ELEMENT_COUNT', `SRC(`$1')')')
+			ALLOC(`dst->$3', `$2', `ARRAY_ELEMENT_COUNT')
+			popdef(`ARRAY_ELEMENT_COUNT')
+
 			ifdef(`AFTER_ALLOC', AFTER_ALLOC)
 
-			LOOPCOUNTER = 0;
-			while (
-			ifelse(`$1', `', `src->$3[LOOPCOUNTER]',
-			`', `', `LOOPCOUNTER < src->$1')
-			) {
+			for (LOOPCOUNTER = 0;
+					ifelse(`$1', `', `SRC(`$3[LOOPCOUNTER]')',
+					`', `', `LOOPCOUNTER < SRC(`$1')');
+					++LOOPCOUNTER) {
 				DISABLECHECK(`
 					STRUCT(`$2', `$3[LOOPCOUNTER]', `$4')
 				')
-
-				++LOOPCOUNTER;
 			}
-			dnl tailing NULL
-			ifelse(`$1', `', `IFCOPY(`dst->$3[LOOPCOUNTER] = NULL;')')
-			popdef(`STRUCT_COUNT')
+			dnl the end marker
+			ifelse(`$1', `', `IFCOPY(`DST(`$3[LOOPCOUNTER]') = NULL;')')
 		')dnl IFDASM
 		DONE(`$3')
