Browse Source

s/origin_compile_file/old_compile_file/g

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@402 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 15 years ago
parent
commit
beefac2f6b
  1. 10
      coverager.c
  2. 20
      xcache.c

10
coverager.c

@ -16,7 +16,7 @@ typedef HashTable *coverager_t;
#define PCOV_HEADER_MAGIC 0x564f4350
static char *xc_coveragedump_dir = NULL;
static zend_compile_file_t *origin_compile_file;
static zend_compile_file_t *old_compile_file;
#if 0
#define DEBUG
@ -435,7 +435,7 @@ static zend_op_array *xc_compile_file_for_coverage(zend_file_handle *h, int type
{
zend_op_array *op_array;
op_array = origin_compile_file(h, type TSRMLS_CC);
op_array = old_compile_file(h, type TSRMLS_CC);
if (op_array) {
if (XG(coverager)) {
xc_coverager_initenv(TSRMLS_C);
@ -464,7 +464,7 @@ void xc_coverager_handle_ext_stmt(zend_op_array *op_array, zend_uchar op) /* {{{
/* init/destroy */
int xc_coverager_init(int module_number TSRMLS_DC) /* {{{ */
{
origin_compile_file = zend_compile_file;
old_compile_file = zend_compile_file;
zend_compile_file = xc_compile_file_for_coverage;
if (cfg_get_string("xcache.coveragedump_directory", &xc_coveragedump_dir) == SUCCESS && xc_coveragedump_dir) {
@ -484,8 +484,8 @@ int xc_coverager_init(int module_number TSRMLS_DC) /* {{{ */
/* }}} */
void xc_coverager_destroy() /* {{{ */
{
if (origin_compile_file == xc_compile_file_for_coverage) {
zend_compile_file = origin_compile_file;
if (old_compile_file == xc_compile_file_for_coverage) {
zend_compile_file = old_compile_file;
}
if (xc_coveragedump_dir) {
xc_coveragedump_dir = NULL;

20
xcache.c

@ -86,7 +86,7 @@ static xc_cache_t **xc_php_caches = NULL;
static xc_cache_t **xc_var_caches = NULL;
static zend_bool xc_initized = 0;
static zend_compile_file_t *origin_compile_file;
static zend_compile_file_t *old_compile_file;
static zend_llist_element *xc_llist_zend_extension;
static zend_bool xc_test = 0;
@ -974,7 +974,7 @@ static zend_op_array *xc_compile_php(xc_entry_data_php_t *php, zend_file_handle
old_constinfo_cnt = zend_hash_num_elements(EG(zend_constants));
zend_try {
op_array = origin_compile_file(h, type TSRMLS_CC);
op_array = old_compile_file(h, type TSRMLS_CC);
} zend_catch {
catched = 1;
} zend_end_try();
@ -1180,7 +1180,7 @@ static zend_op_array *xc_compile_file(zend_file_handle *h, int type TSRMLS_DC) /
TRACE("type = %d\n", h->type);
if (!XG(cacher)) {
op_array = origin_compile_file(h, type TSRMLS_CC);
op_array = old_compile_file(h, type TSRMLS_CC);
#ifdef HAVE_XCACHE_OPTIMIZER
if (XG(optimizer)) {
xc_optimize(op_array TSRMLS_CC);
@ -1194,7 +1194,7 @@ static zend_op_array *xc_compile_file(zend_file_handle *h, int type TSRMLS_DC) /
xce.data.php = &php;
if (xc_entry_init_key_php(&xce, filename, opened_path_buffer TSRMLS_CC) != SUCCESS) {
TRACE("failed to init key for %s", filename);
return origin_compile_file(h, type TSRMLS_CC);
return old_compile_file(h, type TSRMLS_CC);
}
cache = xce.cache;
/* }}} */
@ -1202,7 +1202,7 @@ static zend_op_array *xc_compile_file(zend_file_handle *h, int type TSRMLS_DC) /
/* stale clogs precheck */
if (cache->compiling) {
cache->clogs ++;
return origin_compile_file(h, type TSRMLS_CC);
return old_compile_file(h, type TSRMLS_CC);
}
/* {{{ entry_lookup/hit/md5_init/php_lookup */
stored_xce = NULL;
@ -1256,7 +1256,7 @@ static zend_op_array *xc_compile_file(zend_file_handle *h, int type TSRMLS_DC) /
/* gaveup */
if (gaveup) {
return origin_compile_file(h, type TSRMLS_CC);
return old_compile_file(h, type TSRMLS_CC);
}
/* }}} */
op_array = NULL;
@ -1560,9 +1560,9 @@ static void xc_destroy() /* {{{ */
{
xc_shm_t *shm = NULL;
if (origin_compile_file) {
zend_compile_file = origin_compile_file;
origin_compile_file = NULL;
if (old_compile_file) {
zend_compile_file = old_compile_file;
old_compile_file = NULL;
}
if (xc_php_caches) {
@ -1604,7 +1604,7 @@ static int xc_init(int module_number TSRMLS_DC) /* {{{ */
}
if (xc_php_size) {
origin_compile_file = zend_compile_file;
old_compile_file = zend_compile_file;
zend_compile_file = xc_compile_file;
CHECK(xc_php_caches = xc_cache_init(shm, &xc_php_hcache, &xc_php_hentry, &xc_php_hentry, xc_php_size), "failed init opcode cache");

Loading…
Cancel
Save