Index: /trunk/xcache.c
===================================================================
--- /trunk/xcache.c	(revision 781)
+++ /trunk/xcache.c	(revision 798)
@@ -2884,5 +2884,5 @@
 	}
 
-	RETURN_LONG(Z_REFCOUNT_P(variable));
+	RETURN_LONG(Z_REFCOUNT(*variable));
 }
 /* }}} */
@@ -2900,5 +2900,5 @@
 	}
 
-	RETURN_BOOL(Z_ISREF_P(variable) && Z_REFCOUNT_P(variable) >= 3);
+	RETURN_BOOL(Z_ISREF(*variable) && Z_REFCOUNT(*variable) >= 3);
 }
 /* }}} */
Index: /trunk/xcache.h
===================================================================
--- /trunk/xcache.h	(revision 770)
+++ /trunk/xcache.h	(revision 798)
@@ -54,4 +54,7 @@
 #	define ALLOCA_FLAG(x)
 #endif
+#ifndef Z_ISREF
+#	define Z_ISREF(z) (z).is_ref
+#endif
 #ifndef Z_SET_ISREF
 #	define Z_SET_ISREF(z) (z).is_ref = 1
@@ -59,4 +62,7 @@
 #ifndef Z_UNSET_ISREF
 #	define Z_UNSET_ISREF(z) (z).is_ref = 0
+#endif
+#ifndef Z_REFCOUNT
+#	define Z_REFCOUNT(z) (z).refcount
 #endif
 #ifndef Z_SET_REFCOUNT
