Index: /branches/1.3/processor/head.m4
===================================================================
--- /branches/1.3/processor/head.m4	(revision 622)
+++ /branches/1.3/processor/head.m4	(revision 646)
@@ -130,5 +130,5 @@
 /* {{{ xc_calc_string_n */
 REDEF(`KIND', `calc')
-static inline void xc_calc_string_n(xc_processor_t *processor, zend_uchar type, zstr str, long size IFASSERT(`, int relayline')) {
+static inline void xc_calc_string_n(xc_processor_t *processor, zend_uchar type, const zstr str, long size IFASSERT(`, int relayline')) {
 	pushdef(`__LINE__', `relayline')
 	int realsize = UNISW(size, (type == IS_UNICODE) ? UBYTES(size) : size);
@@ -152,5 +152,5 @@
 /* {{{ xc_store_string_n */
 REDEF(`KIND', `store')
-static inline zstr xc_store_string_n(xc_processor_t *processor, zend_uchar type, zstr str, long size IFASSERT(`, int relayline')) {
+static inline zstr xc_store_string_n(xc_processor_t *processor, zend_uchar type, const zstr str, long size IFASSERT(`, int relayline')) {
 	pushdef(`__LINE__', `relayline')
 	int realsize = UNISW(size, (type == IS_UNICODE) ? UBYTES(size) : size);
Index: /branches/1.3/processor/string.m4
===================================================================
--- /branches/1.3/processor/string.m4	(revision 622)
+++ /branches/1.3/processor/string.m4	(revision 646)
@@ -21,4 +21,7 @@
 			STRTYPE, `zstr_char',  `ZSTR_S($1)',
 			`',      `',           `$1'))
+	pushdef(`U', ifelse(
+			PTRTYPE, `char',  `',
+			PTRTYPE, `UChar', `u'))
 	if (SRCPTR == NULL) {
 		IFNOTMEMCPY(`IFCOPY(`
@@ -56,9 +59,8 @@
 			')
 		')
-		IFCALC(`xc_calc_string_n(processor, ISTYPE, SRCSTR, $3 IFASSERT(`, __LINE__'));')
-		IFSTORE(`DSTPTR = ifelse(PTRTYPE,`char',`ZSTR_S',`ZSTR_U')(xc_store_string_n(processor, ISTYPE, SRCSTR, $3 IFASSERT(`, __LINE__')));')
+		IFCALC(`xc_calc_string_n(processor, ISTYPE, ZSTR(SRCSTR), $3 IFASSERT(`, __LINE__'));')
+		IFSTORE(`DSTPTR = ifelse(PTRTYPE,`char',`ZSTR_S',`ZSTR_U')(xc_store_string_n(processor, ISTYPE, ZSTR(SRCSTR), $3 IFASSERT(`, __LINE__')));')
 		IFRESTORE(`
-			ALLOC(DSTPTR, `STRTYPE', `($3)')
-			memcpy(DSTPTR, SRCPTR, sizeof(STRTYPE) * ($3));
+			DSTPTR = e`'U`'strndup(SRCPTR, ($3) - 1);
 		')
 		FIXPOINTER_EX(`PTRTYPE', DSTPTR)
@@ -75,4 +77,5 @@
 		')
 	}
+	popdef(`U')
 	popdef(`DSTPTR')
 	popdef(`SRCPTR')
Index: /branches/1.3/processor/processor.m4
===================================================================
--- /branches/1.3/processor/processor.m4	(revision 644)
+++ /branches/1.3/processor/processor.m4	(revision 646)
@@ -220,7 +220,7 @@
 DEF_STRUCT_P_FUNC(`zend_arg_info', , `
 	DISPATCH(zend_uint, name_len)
-	COPY(name)
+	PROC_ZSTRING_L(, name, name_len)
 	DISPATCH(zend_uint, class_name_len)
-	COPY(class_name)
+	PROC_ZSTRING_L(, class_name, class_name_len)
 	DISPATCH(zend_bool, array_type_hint)
 	DISPATCH(zend_bool, allow_null)
