updates ChangeLog & NEWS, updates xcache_get_refcount, adds xcache_get_cowcount
git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1476 c26eb9a1-5813-0410-bd6c-c2e55f420ca7master
parent
99c25466e4
commit
8550abf7e8
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
4.0.0 2014-??-??
|
||||
API Changes
|
||||
========
|
||||
* new: proto array xcache_get_refcount(mixed &$variable), with +1 side effect removed
|
||||
* chg: proto array xcache_get_cowcount(mixed $value)
|
||||
|
||||
ChangeLog
|
||||
========
|
||||
* cacher:
|
||||
* (WIP) defragment
|
||||
* (WIP) cache to disk
|
||||
|
||||
3.1.1 2013-??-??
|
||||
ChangeLog
|
||||
========
|
||||
|
|
6
NEWS
6
NEWS
|
@ -1,3 +1,9 @@
|
|||
4.0.0 2014-??-??
|
||||
ChangeLog
|
||||
========
|
||||
* api updates
|
||||
* cache defragment, cache to disk
|
||||
|
||||
3.1.1 2013-??-??
|
||||
* compatible with bcompiler
|
||||
|
||||
|
|
37
xcache.c
37
xcache.c
|
@ -176,8 +176,16 @@ void xc_shutdown_globals(zend_xcache_globals* xcache_globals TSRMLS_DC)
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int xcache_get_refcount(mixed variable)
|
||||
XCache internal uses only: Get reference count of variable */
|
||||
/* {{{ proto int xcache_get_refcount(mixed &variable)
|
||||
XCache internal uses only: Get reference count of referenced variable */
|
||||
#ifdef ZEND_BEGIN_ARG_INFO_EX
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_get_refcount, 0, 0, 1)
|
||||
ZEND_ARG_INFO(1, variable)
|
||||
ZEND_END_ARG_INFO()
|
||||
#else
|
||||
static unsigned char arginfo_xcache_get_refcount[] = { 1, BYREF_FORCE };
|
||||
#endif
|
||||
|
||||
PHP_FUNCTION(xcache_get_refcount)
|
||||
{
|
||||
zval *variable;
|
||||
|
@ -185,7 +193,27 @@ PHP_FUNCTION(xcache_get_refcount)
|
|||
RETURN_NULL();
|
||||
}
|
||||
|
||||
RETURN_LONG(Z_REFCOUNT(*variable));
|
||||
RETURN_LONG(Z_REFCOUNT(*variable) - 1);
|
||||
}
|
||||
/* }}} */
|
||||
/* {{{ proto int xcache_get_cowcount(mixed value)
|
||||
XCache internal uses only: Get reference count of copy-on-write variable or data */
|
||||
#ifdef ZEND_BEGIN_ARG_INFO_EX
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_get_cowcount, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, variable)
|
||||
ZEND_END_ARG_INFO()
|
||||
#else
|
||||
static unsigned char arginfo_xcache_get_cowcount[] = { 1, BYREF_NONE };
|
||||
#endif
|
||||
|
||||
PHP_FUNCTION(xcache_get_cowcount)
|
||||
{
|
||||
zval *variable;
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &variable) == FAILURE) {
|
||||
RETURN_NULL();
|
||||
}
|
||||
|
||||
RETURN_LONG(Z_REFCOUNT(*variable) - 1);
|
||||
}
|
||||
/* }}} */
|
||||
/* {{{ proto bool xcache_get_isref(mixed variable)
|
||||
|
@ -425,7 +453,8 @@ static zend_function_entry xcache_functions[] = /* {{{ */
|
|||
PHP_FE(xcache_get_opcode, NULL)
|
||||
PHP_FE(xcache_get_opcode_spec, NULL)
|
||||
PHP_FE(xcache_is_autoglobal, NULL)
|
||||
PHP_FE(xcache_get_refcount, NULL)
|
||||
PHP_FE(xcache_get_refcount, arginfo_xcache_get_refcount)
|
||||
PHP_FE(xcache_get_cowcount, arginfo_xcache_get_cowcount)
|
||||
PHP_FE(xcache_get_isref, arginfo_xcache_get_isref)
|
||||
#ifdef HAVE_XCACHE_DPRINT
|
||||
PHP_FE(xcache_dprint, NULL)
|
||||
|
|
Loading…
Reference in New Issue