Browse Source

typo

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1118 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 9 years ago
parent
commit
edc0fb1ae9
  1. 2
      mod_cacher/xc_cacher.c
  2. 18
      mod_coverager/xc_coverager.c
  3. 2
      xcache_globals.h

2
mod_cacher/xc_cacher.c

@ -3162,6 +3162,7 @@ static zend_extension xc_cacher_zend_extension_entry = {
# define DEFAULT_PATH "/dev/zero"
#endif
PHP_INI_BEGIN()
PHP_INI_ENTRY1 ("xcache.shm_scheme", "mmap", PHP_INI_SYSTEM, xcache_OnUpdateString, &xc_shm_scheme)
PHP_INI_ENTRY1 ("xcache.mmap_path", DEFAULT_PATH, PHP_INI_SYSTEM, xcache_OnUpdateString, &xc_mmap_path)
PHP_INI_ENTRY1_EX ("xcache.readonly_protection", "0", PHP_INI_SYSTEM, xcache_OnUpdateBool, &xc_readonly_protection, zend_ini_boolean_displayer_cb)
/* opcode cache */
@ -3169,7 +3170,6 @@ PHP_INI_BEGIN()
PHP_INI_ENTRY1 ("xcache.size", "0", PHP_INI_SYSTEM, xcache_OnUpdateDummy, NULL)
PHP_INI_ENTRY1 ("xcache.count", "1", PHP_INI_SYSTEM, xcache_OnUpdateDummy, NULL)
PHP_INI_ENTRY1 ("xcache.slots", "8K", PHP_INI_SYSTEM, xcache_OnUpdateDummy, NULL)
PHP_INI_ENTRY1 ("xcache.shm_scheme", "mmap", PHP_INI_SYSTEM, xcache_OnUpdateString, &xc_shm_scheme)
PHP_INI_ENTRY1 ("xcache.ttl", "0", PHP_INI_SYSTEM, xcache_OnUpdateULong, &xc_php_ttl)
PHP_INI_ENTRY1 ("xcache.gc_interval", "0", PHP_INI_SYSTEM, xcache_OnUpdateULong, &xc_php_gc_interval)
STD_PHP_INI_BOOLEAN("xcache.cacher", "1", PHP_INI_ALL, OnUpdateBool, cacher, zend_xcache_globals, xcache_globals)

18
mod_coverager/xc_coverager.c

@ -242,14 +242,14 @@ static void xc_coverager_cleanup(TSRMLS_D) /* {{{ */
}
/* }}} */
static void xc_coverager_enable(TSRMLS_D) /* {{{ */
static void xc_coverager_start(TSRMLS_D) /* {{{ */
{
XG(coverager_enabled) = 1;
XG(coverager_started) = 1;
}
/* }}} */
static void xc_coverager_disable(TSRMLS_D) /* {{{ */
static void xc_coverager_stop(TSRMLS_D) /* {{{ */
{
XG(coverager_enabled) = 0;
XG(coverager_started) = 0;
}
/* }}} */
@ -257,7 +257,7 @@ static PHP_RINIT_FUNCTION(xcache_coverager) /* {{{ */
{
if (XG(coverager)) {
if (XG(coverager_autostart)) {
xc_coverager_enable(TSRMLS_C);
xc_coverager_start(TSRMLS_C);
}
#ifdef ZEND_COMPILE_EXTENDED_INFO
CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO;
@ -266,7 +266,7 @@ static PHP_RINIT_FUNCTION(xcache_coverager) /* {{{ */
#endif
}
else {
XG(coverager_enabled) = 0;
XG(coverager_started) = 0;
}
return SUCCESS;
}
@ -470,7 +470,7 @@ static void xc_coverager_handle_ext_stmt(zend_op_array *op_array, zend_uchar op)
{
TSRMLS_FETCH();
if (XG(coverages) && XG(coverager_enabled)) {
if (XG(coverages) && XG(coverager_started)) {
int size = xc_coverager_get_op_array_size_no_tail(op_array);
int oplineno = (*EG(opline_ptr)) - op_array->opcodes;
if (oplineno < size) {
@ -527,7 +527,7 @@ PHP_FUNCTION(xcache_coverager_start)
}
if (XG(coverager)) {
xc_coverager_enable(TSRMLS_C);
xc_coverager_start(TSRMLS_C);
}
else {
php_error(E_WARNING, "You can only start coverager after you set 'xcache.coverager' to 'On' in ini");
@ -545,7 +545,7 @@ PHP_FUNCTION(xcache_coverager_stop)
return;
}
xc_coverager_disable(TSRMLS_C);
xc_coverager_stop(TSRMLS_C);
if (clean) {
xc_coverager_clean(TSRMLS_C);
}

2
xcache_globals.h

@ -11,7 +11,7 @@ ZEND_BEGIN_MODULE_GLOBALS(xcache)
#ifdef HAVE_XCACHE_COVERAGER
zend_bool coverager;
zend_bool coverager_autostart;
zend_bool coverager_enabled;
zend_bool coverager_started;
HashTable *coverages; /* coverages[file][line] = times */
#endif
xc_stack_t *php_holds;

Loading…
Cancel
Save