Browse Source

merge from trunk: undefined macro with old php

git-svn-id: svn://svn.lighttpd.net/xcache/branches/1.3@813 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
1.3
Xuefer 10 years ago
parent
commit
029e247354
  1. 4
      xcache.c
  2. 6
      xcache.h

4
xcache.c

@ -2288,7 +2288,7 @@ PHP_FUNCTION(xcache_get_refcount)
RETURN_NULL();
}
RETURN_LONG(Z_REFCOUNT_P(variable));
RETURN_LONG(Z_REFCOUNT(*variable));
}
/* }}} */
/* {{{ proto bool xcache_get_isref(mixed variable)
@ -2304,7 +2304,7 @@ PHP_FUNCTION(xcache_get_isref)
RETURN_NULL();
}
RETURN_BOOL(Z_ISREF_P(variable) && Z_REFCOUNT_P(variable) >= 3);
RETURN_BOOL(Z_ISREF(*variable) && Z_REFCOUNT(*variable) >= 3);
}
/* }}} */
#ifdef HAVE_XCACHE_DPRINT

6
xcache.h

@ -53,12 +53,18 @@
# define my_free_alloca(size, use_heap) free_alloca(size)
# 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
#endif
#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
# define Z_SET_REFCOUNT(z, rc) (z).refcount = rc
#endif

Loading…
Cancel
Save