Index: trunk/xcache.h
===================================================================
--- trunk/xcache.h	(revision 840)
+++ trunk/xcache.h	(revision 846)
@@ -41,4 +41,9 @@
 #else
 #	define ZESW(v1, v2) v2
+#endif
+#ifdef ZEND_ENGINE_2_4
+#	define ZEND_24(x) x
+#else
+#	define ZEND_24(x)
 #endif
 
@@ -150,4 +155,12 @@
 typedef char *zstr;
 typedef const char *const_zstr;
+#ifdef ZEND_ENGINE_2_4
+typedef const char *const24_zstr;
+typedef const char *const24_str;
+#else
+typedef char *const24_zstr;
+typedef char *const24_str;
+#endif
+
 #	define ZSTR_S(s)     (s)
 #	define ZSTR_U(s)     (s)
@@ -292,14 +305,14 @@
 typedef struct {
 #ifdef IS_UNICODE
-	zend_uchar type;
-#endif
-	zstr      key;
-	zend_uint key_size;
-	ulong     h;
-	zend_uint methodinfo_cnt;
+	zend_uchar   type;
+#endif
+	const24_zstr key;
+	zend_uint    key_size;
+	ulong        h;
+	zend_uint  methodinfo_cnt;
 	xc_op_array_info_t *methodinfos;
-	xc_cest_t cest;
+	xc_cest_t    cest;
 #ifndef ZEND_COMPILE_DELAYED_BINDING
-	int       oplineno;
+	int          oplineno;
 #endif
 } xc_classinfo_t;
@@ -309,9 +322,9 @@
 typedef struct {
 #ifdef IS_UNICODE
-	zend_uchar type;
-#endif
-	zstr      key;
-	zend_uint key_size;
-	ulong     h;
+	zend_uchar    type;
+#endif
+	const24_zstr  key;
+	zend_uint     key_size;
+	ulong         h;
 	zend_constant constant;
 } xc_constinfo_t;
@@ -321,9 +334,9 @@
 typedef struct {
 #ifdef IS_UNICODE
-	zend_uchar type;
-#endif
-	zstr      key;
-	zend_uint key_size;
-	ulong     h;
+	zend_uchar     type;
+#endif
+	const24_zstr   key;
+	zend_uint      key_size;
+	ulong          h;
 	xc_op_array_info_t op_array_info;
 	zend_function func;
@@ -334,9 +347,9 @@
 typedef struct {
 #ifdef IS_UNICODE
-	zend_uchar type;
-#endif
-	zstr       key;
-	zend_uint  key_len;
-	ulong      h;
+	zend_uchar   type;
+#endif
+	const24_zstr key;
+	zend_uint    key_len;
+	ulong        h;
 } xc_autoglobal_t;
 /* }}} */
@@ -438,5 +451,5 @@
 	/* php only */
 	int    filepath_len;
-	char  *filepath;
+	ZEND_24(const) char *filepath;
 	int    dirpath_len;
 	char  *dirpath;
