Index: /trunk/processor/hashtable.m4
===================================================================
--- /trunk/processor/hashtable.m4	(revision 843)
+++ /trunk/processor/hashtable.m4	(revision 844)
@@ -109,6 +109,6 @@
 #ifdef ZEND_ENGINE_2_4
 			memcpy(pnew, b, BUCKET_HEAD_SIZE(Bucket));
+			memcpy((char *) (pnew + 1), b->arKey, BUCKET_KEY_SIZE(b));
 			pnew->arKey = (const char *) (pnew + 1);
-			memcpy(pnew->arKey, b->arKey, BUCKET_KEY_SIZE(b));
 #else
 			memcpy(pnew, b, bucketsize);
Index: /trunk/processor/head.m4
===================================================================
--- /trunk/processor/head.m4	(revision 843)
+++ /trunk/processor/head.m4	(revision 844)
@@ -111,5 +111,5 @@
 {
 	void **p = (void **) mem;
-	void **end = (char *) mem + n;
+	void **end = (void **) ((char *) mem + n);
 	while (p < end - sizeof(content)) {
 		*p = content;
@@ -148,5 +148,5 @@
 #endif
 /* {{{ xc_zstrlen_char */
-static inline int xc_zstrlen_char(zstr s)
+static inline int xc_zstrlen_char(const_zstr s)
 {
 	return strlen(ZSTR_S(s));
@@ -161,5 +161,5 @@
 /* }}} */
 /* {{{ xc_zstrlen */
-static inline int xc_zstrlen(int type, zstr s)
+static inline int xc_zstrlen(int type, const_zstr s)
 {
 	return type == IS_UNICODE ? xc_zstrlen_uchar(s) : xc_zstrlen_char(s);
Index: /trunk/processor/main.m4
===================================================================
--- /trunk/processor/main.m4	(revision 843)
+++ /trunk/processor/main.m4	(revision 844)
@@ -58,5 +58,5 @@
 		$1 = (FORCETYPE *) (processor->p = (char *) ALIGN(processor->p));
 		ifelse(`$4', `', `
-				IFASSERT(`memsetptr($1, (void *) __LINE__, SIZE);')
+				IFASSERT(`memsetptr($1, (void *) (unsigned long) __LINE__, SIZE);')
 			', `
 				memset($1, 0, SIZE);
@@ -159,4 +159,8 @@
 define(`SETNULL', `SETNULL_EX(`dst->$1')DONE(`$1')')
 dnl }}}
+dnl {{{ SETZERO_EX
+define(`SETZERO_EX', `IFCOPY(`$1 = 0;')')
+define(`SETZERO', `SETZERO_EX(`dst->$1')DONE(`$1')')
+dnl }}}
 dnl {{{ COPYNULL_EX(1:dst, 2:elm-name)
 define(`COPYNULL_EX', `
@@ -169,4 +173,16 @@
 define(`COPYNULL', `
 	COPYNULL_EX(`dst->$1', `$1')DONE(`$1')
+')
+dnl }}}
+dnl {{{ COPYZERO_EX(1:dst, 2:elm-name)
+define(`COPYZERO_EX', `
+	IFDASM(`add_assoc_long_ex(dst, ZEND_STRS("$2"), 0);')
+	IFNOTMEMCPY(`IFCOPY(`$1 = 0;')')
+	assert(patsubst($1, dst, src) == 0);
+')
+dnl }}}
+dnl {{{ COPYZERO(1:elm)
+define(`COPYZERO', `
+	COPYZERO_EX(`dst->$1', `$1')DONE(`$1')
 ')
 dnl }}}
Index: /trunk/processor/process.m4
===================================================================
--- /trunk/processor/process.m4	(revision 843)
+++ /trunk/processor/process.m4	(revision 844)
@@ -56,5 +56,5 @@
 	, `$1', `zend_ulong',       `PROCESS_SCALAR(`$2', `lu', `$1')'
 	, `$1', `ulong',            `PROCESS_SCALAR(`$2', `lu', `$1')'
-	, `$1', `size_t',           `PROCESS_SCALAR(`$2', `u', `$1')'
+	, `$1', `size_t',           `PROCESS_SCALAR(`$2', `lu', `$1')'
 	, `$1', `long',             `PROCESS_SCALAR(`$2', `ld', `$1')'
 	, `$1', `time_t',           `PROCESS_SCALAR(`$2', `ld', `$1')'
Index: /trunk/processor/processor.m4
===================================================================
--- /trunk/processor/processor.m4	(revision 843)
+++ /trunk/processor/processor.m4	(revision 844)
@@ -405,10 +405,10 @@
 	dnl runtime binding: ADD_INTERFACE will deal with it
 	COPYNULL(`interfaces')
-	COPYNULL(`num_interfaces')
+	COPYZERO(`num_interfaces')
 
 #	ifdef ZEND_ENGINE_2_4
 	dnl runtime binding: ADD_TRAIT will deal with it
 	COPYNULL(traits)
-	COPYNULL(num_traits)
+	COPYZERO(num_traits)
 #	endif
 #else
Index: /trunk/processor/string.m4
===================================================================
--- /trunk/processor/string.m4	(revision 843)
+++ /trunk/processor/string.m4	(revision 844)
@@ -46,5 +46,5 @@
 				fprintf(stderr, "string:%s:\t\"", "$1");
 				xc_dprint_str_len(Z_STRVAL(reszv), Z_STRLEN(reszv));
-				fprintf(stderr, "\" len=%d\n", $3 - 1);
+				fprintf(stderr, "\" len=%lu\n", (unsigned long) $3 - 1);
 				if (usecopy) {
 					zval_dtor(&reszv);
@@ -56,5 +56,5 @@
 			fprintf(stderr, "string:%s:\t\"", "$1");
 			xc_dprint_str_len(SRCPTR, $3 - 1);
-			fprintf(stderr, "\" len=%d\n", $3 - 1);
+			fprintf(stderr, "\" len=%lu\n", (unsigned long) $3 - 1);
 			')
 		')
