Browse Source

merged r304,r305,r306,r307 from trunk

git-svn-id: svn://svn.lighttpd.net/xcache/branches/1.3@593 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
1.3
Xuefer 12 years ago
parent
commit
c2f87ac55a
  1. 40
      coverager.c
  2. 46
      mem.c
  3. 10
      mmap.c
  4. 2
      processor/main.m4
  5. 6
      stack.c
  6. 5
      stack.h
  7. 28
      utils.c
  8. 18
      utils.h
  9. 9
      xc_malloc.c
  10. 3
      xc_shm.h
  11. 85
      xcache.c

40
coverager.c

@ -26,9 +26,7 @@ static zend_compile_file_t *old_compile_file = NULL;
static void xc_destroy_coverage(void *pDest) /* {{{ */
{
coverager_t cov = *(coverager_t*) pDest;
#ifdef DEBUG
fprintf(stderr, "destroy %p\n", cov);
#endif
TRACE("destroy %p", cov);
zend_hash_destroy(cov);
efree(cov);
}
@ -38,9 +36,7 @@ void xcache_mkdirs_ex(char *root, int rootlen, char *path, int pathlen TSRMLS_DC
char *fullpath;
struct stat st;
#ifdef DEBUG
fprintf(stderr, "mkdirs %s %d %s %d\n", root, rootlen, path, pathlen);
#endif
TRACE("mkdirs %s %d %s %d", root, rootlen, path, pathlen);
fullpath = do_alloca(rootlen + pathlen + 1);
memcpy(fullpath, root, rootlen);
memcpy(fullpath + rootlen, path, pathlen);
@ -55,9 +51,7 @@ void xcache_mkdirs_ex(char *root, int rootlen, char *path, int pathlen TSRMLS_DC
xcache_mkdirs_ex(root, rootlen, path, chr - path TSRMLS_CC);
*chr = PHP_DIR_SEPARATOR;
}
#ifdef DEBUG
fprintf(stderr, "mkdir %s\n", fullpath);
#endif
TRACE("mkdir %s", fullpath);
#if PHP_MAJOR_VERSION > 5
php_stream_mkdir(fullpath, 0700, REPORT_ERRORS, NULL);
#else
@ -112,9 +106,7 @@ static void xc_coverager_save_cov(char *srcfile, char *outfilename, coverager_t
}
if (newfile) {
#ifdef DEBUG
fprintf(stderr, "new file\n");
#endif
TRACE("%s", "new file");
}
else if (outstat.st_size) {
len = outstat.st_size;
@ -122,9 +114,7 @@ static void xc_coverager_save_cov(char *srcfile, char *outfilename, coverager_t
if (read(fd, (void *) contents, len) != len) {
goto bailout;
}
#ifdef DEBUG
fprintf(stderr, "oldsize %d\n", (int) len);
#endif
TRACE("oldsize %d", (int) len);
do {
p = (long *) contents;
len -= sizeof(long);
@ -132,9 +122,7 @@ static void xc_coverager_save_cov(char *srcfile, char *outfilename, coverager_t
break;
}
if (*p++ != PCOV_HEADER_MAGIC) {
#ifdef DEBUG
fprintf(stderr, "wrong magic in file %s\n", outfilename);
#endif
TRACE("wrong magic in file %s", outfilename);
break;
}
@ -289,9 +277,7 @@ static void xc_coverager_autodump(TSRMLS_D) /* {{{ */
strcpy(outfilename + dumpdir_len, ZSTR_S(s));
strcpy(outfilename + dumpdir_len + size - 1, ".pcov");
#ifdef DEBUG
fprintf(stderr, "outfilename %s\n", outfilename);
#endif
TRACE("outfilename %s", outfilename);
xc_coverager_save_cov(ZSTR_S(s), outfilename, *pcov TSRMLS_CC);
zend_hash_move_forward_ex(XG(coverages), &pos);
}
@ -353,18 +339,14 @@ static coverager_t xc_coverager_get(char *filename TSRMLS_DC) /* {{{ */
coverager_t cov, *pcov;
if (zend_hash_find(XG(coverages), filename, len, (void **) &pcov) == SUCCESS) {
#ifdef DEBUG
fprintf(stderr, "got coverage %s %p\n", filename, *pcov);
#endif
TRACE("got coverage %s %p", filename, *pcov);
return *pcov;
}
else {
cov = emalloc(sizeof(HashTable));
zend_hash_init(cov, 0, NULL, NULL, 0);
zend_hash_add(XG(coverages), filename, len, (void **) &cov, sizeof(cov), NULL);
#ifdef DEBUG
fprintf(stderr, "new coverage %s %p\n", filename, cov);
#endif
TRACE("new coverage %s %p", filename, cov);
return cov;
}
}
@ -533,9 +515,7 @@ PHP_FUNCTION(xcache_coverager_decode)
return;
}
if (*p++ != PCOV_HEADER_MAGIC) {
#ifdef DEBUG
fprintf(stderr, "wrong magic in xcache_coverager_decode");
#endif
TRACE("%s", "wrong magic in xcache_coverager_decode");
return;
}

46
mem.c

@ -12,11 +12,12 @@
#define XC_MEM_IMPL _xc_mem_mem_t
#include "xc_shm.h"
#include "align.h"
#include "utils.h"
#ifdef TEST
# define ALLOC_DEBUG
# define DEBUG
#endif
#ifdef ALLOC_DEBUG
#ifdef DEBUG
# define ALLOC_DEBUG_BLOCK_CHECK
#endif
@ -90,19 +91,15 @@ static XC_MEM_MALLOC(xc_mem_malloc) /* {{{ */
/* realsize is ALIGNed so next block start at ALIGNed address */
realsize = ALIGN(realsize);
#ifdef ALLOC_DEBUG
fprintf(stderr, "avail: %d (%dKB). Allocate size: %d realsize: %d (%dKB)"
TRACE("avail: %d (%dKB). Allocate size: %d realsize: %d (%dKB)"
, mem->avail, mem->avail / 1024
, size
, realsize, realsize / 1024
);
#endif
do {
p = NULL;
if (mem->avail < realsize) {
#ifdef ALLOC_DEBUG
fprintf(stderr, " oom\n");
#endif
TRACE("%s", " oom");
break;
}
@ -131,9 +128,7 @@ static XC_MEM_MALLOC(xc_mem_malloc) /* {{{ */
}
if (b == NULL) {
#ifdef ALLOC_DEBUG
fprintf(stderr, " no fit chunk\n");
#endif
TRACE("%s", " no fit chunk");
break;
}
@ -148,9 +143,7 @@ static XC_MEM_MALLOC(xc_mem_malloc) /* {{{ */
/* perfect fit, just unlink */
if (cur->size == realsize) {
prev->next = cur->next;
#ifdef ALLOC_DEBUG
fprintf(stderr, " perfect fit. Got: %p\n", p);
#endif
TRACE(" perfect fit. Got: %p", p);
break;
}
@ -168,14 +161,12 @@ static XC_MEM_MALLOC(xc_mem_malloc) /* {{{ */
* `--^
*/
#ifdef ALLOC_DEBUG
fprintf(stderr, " -> avail: %d (%dKB). new next: %p offset: %d %dKB. Got: %p\n"
TRACE(" -> avail: %d (%dKB). new next: %p offset: %d %dKB. Got: %p"
, mem->avail, mem->avail / 1024
, newb
, PSUB(newb, mem), PSUB(newb, mem) / 1024
, p
);
#endif
prev->next = newb;
/* prev|cur|newb|next
* `-----^
@ -192,10 +183,7 @@ static XC_MEM_FREE(xc_mem_free) /* {{{ return block size freed */
int size;
cur = (xc_block_t *) (CHAR_PTR(p) - BLOCK_HEADER_SIZE());
#ifdef ALLOC_DEBUG
fprintf(stderr, "freeing: %p", p);
fprintf(stderr, ", size=%d", cur->size);
#endif
TRACE("freeing: %p, size=%d", p, cur->size);
xc_block_check(cur);
assert((char*)mem < (char*)cur && (char*)cur < (char*)mem + mem->size);
@ -210,9 +198,7 @@ static XC_MEM_FREE(xc_mem_free) /* {{{ return block size freed */
b->next = cur;
size = cur->size;
#ifdef ALLOC_DEBUG
fprintf(stderr, ", avail %d (%dKB)", mem->avail, mem->avail / 1024);
#endif
TRACE(" avail %d (%dKB)", mem->avail, mem->avail / 1024);
mem->avail += size;
/* combine prev|cur */
@ -220,9 +206,7 @@ static XC_MEM_FREE(xc_mem_free) /* {{{ return block size freed */
b->size += cur->size;
b->next = cur->next;
cur = b;
#ifdef ALLOC_DEBUG
fprintf(stderr, ", combine prev");
#endif
TRACE("%s", " combine prev");
}
/* combine cur|next */
@ -230,13 +214,9 @@ static XC_MEM_FREE(xc_mem_free) /* {{{ return block size freed */
if (PADD(cur, cur->size) == (char *)b) {
cur->size += b->size;
cur->next = b->next;
#ifdef ALLOC_DEBUG
fprintf(stderr, ", combine next");
#endif
TRACE("%s", " combine next");
}
#ifdef ALLOC_DEBUG
fprintf(stderr, " -> avail %d (%dKB)\n", mem->avail, mem->avail / 1024);
#endif
TRACE(" -> avail %d (%dKB)", mem->avail, mem->avail / 1024);
return size;
}
/* }}} */

10
mmap.c

@ -1,6 +1,4 @@
#undef ALLOC_DEBUG
#include <stdio.h>
#include <assert.h>
#include <limits.h>
@ -33,6 +31,7 @@
#include "php.h"
#define XC_SHM_IMPL _xc_mmap_shm_t
#include "xc_shm.h"
#include "utils.h"
#ifndef max
#define max(a, b) ((a) < (b) ? (b) : (a))
@ -54,13 +53,6 @@ struct _xc_mmap_shm_t {
#endif
};
#undef NDEBUG
#ifdef ALLOC_DEBUG
# define inline
#else
# define NDEBUG
#endif
#include <assert.h>
/* }}} */
#define CHECK(x, e) do { if ((x) == NULL) { zend_error(E_ERROR, "XCache: " e); goto err; } } while (0)
#define PTR_ADD(ptr, v) (((char *) (ptr)) + (v))

2
processor/main.m4

@ -38,7 +38,7 @@ define(`ALLOC', `
')
IFSTORE(`
IFASSERT(`{
if (!xc_stack_size(&processor->allocsizes)) {
if (!xc_stack_count(&processor->allocsizes)) {
fprintf(stderr, "mismatch `$@' at line %d\n", __LINE__);
}
else {

6
stack.c

@ -3,10 +3,10 @@
#include "stack.h"
typedef xc_stack_t* S;
void xc_stack_init(S stack)
void xc_stack_init_ex(S stack, int initsize)
{
stack->cnt = 0;
stack->size = 8;
stack->size = initsize;
stack->data = malloc(sizeof(void *) * stack->size);
}
@ -42,7 +42,7 @@ void* xc_stack_get(S stack, int n)
return stack->data[n];
}
int xc_stack_size(S stack)
int xc_stack_count(S stack)
{
assert(stack != NULL);
return stack->cnt;

5
stack.h

@ -6,12 +6,13 @@ typedef struct {
} xc_stack_t;
#define S xc_stack_t*
void xc_stack_init(S stack);
void xc_stack_init_ex(S stack, int initsize);
#define xc_stack_init(stack) xc_stack_init_ex(stack, 8)
void xc_stack_destroy(S stack);
void xc_stack_push(S stack, void *item);
void *xc_stack_pop(S stack);
void *xc_stack_top(S stack);
void *xc_stack_get(S stack, int n);
int xc_stack_size(S stack);
int xc_stack_count(S stack);
void xc_stack_reverse(S stack);
#undef S

28
utils.c

@ -332,9 +332,7 @@ static int xc_do_early_binding(zend_op_array *op_array, HashTable *class_table,
{
zend_op *opline;
#ifdef DEBUG
fprintf(stderr, "binding %d\n", oplineno);
#endif
TRACE("binding %d", oplineno);
assert(oplineno >= 0);
/* do early binding */
@ -353,9 +351,7 @@ static int xc_do_early_binding(zend_op_array *op_array, HashTable *class_table,
}
parent_name = &(opline - 1)->op2.u.constant;
# ifdef DEBUG
fprintf(stderr, "binding with parent %s\n", Z_STRVAL_P(parent_name));
# endif
TRACE("binding with parent %s", Z_STRVAL_P(parent_name));
if (zend_lookup_class(Z_STRVAL_P(parent_name), Z_STRLEN_P(parent_name), &pce TSRMLS_CC) == FAILURE) {
return FAILURE;
}
@ -370,9 +366,7 @@ static int xc_do_early_binding(zend_op_array *op_array, HashTable *class_table,
&& (opline - 1)->opcode == ZEND_FETCH_CLASS) {
zend_op *fetch_class_opline = opline - 1;
# ifdef DEBUG
fprintf(stderr, "%s %p\n", Z_STRVAL(fetch_class_opline->op2.u.constant), Z_STRVAL(fetch_class_opline->op2.u.constant));
# endif
TRACE("%s %p", Z_STRVAL(fetch_class_opline->op2.u.constant), Z_STRVAL(fetch_class_opline->op2.u.constant));
OP_ZVAL_DTOR(fetch_class_opline->op2);
fetch_class_opline->opcode = ZEND_NOP;
ZEND_VM_SET_OPCODE_HANDLER(fetch_class_opline);
@ -735,3 +729,19 @@ void xc_sandbox_free(xc_sandbox_t *sandbox, xc_install_action_t install TSRMLS_D
}
}
/* }}} */
int xc_vtrace(const char *fmt, va_list args) /* {{{ */
{
vfprintf(stderr, fmt, args);
return 0;
}
/* }}} */
int xc_trace(const char *fmt, ...) /* {{{ */
{
va_list args;
va_start(args, fmt);
xc_vtrace(fmt, args);
va_end(args);
return 0;
}
/* }}} */

18
utils.h

@ -1,4 +1,22 @@
#include "php.h"
#include "xcache.h"
#ifdef DEBUG
# define IFDEBUG(x) (x)
# define TRACE(fmt, ...) \
xc_trace("%s:%d: " fmt "\r\n", __FILE__, __LINE__, __VA_ARGS__)
int xc_trace(const char *fmt, ...) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 1, 2);
# undef NDEBUG
# undef inline
# define inline
#else
# define TRACE(fmt, ...) do { } while (0)
# define IFDEBUG(x) do { } while (0)
# ifndef NDEBUG
# define NDEBUG
# endif
#endif
#include <assert.h>
typedef struct {
int alloc;

9
xc_malloc.c

@ -10,6 +10,7 @@
#include "xc_shm.h"
#include "php.h"
#include "align.h"
#include "utils.h"
struct _xc_malloc_mem_t {
const xc_mem_handlers_t *handlers;
@ -115,14 +116,6 @@ struct _xc_malloc_shm_t {
xc_shmsize_t size;
xc_shmsize_t memoffset;
};
#undef NDEBUG
#ifdef ALLOC_DEBUG
# define inline
#else
# define NDEBUG
#endif
#include <assert.h>
/* }}} */
static XC_SHM_CAN_READONLY(xc_malloc_can_readonly) /* {{{ */

3
xc_shm.h

@ -1,3 +1,5 @@
#ifndef XC_SHM_H
#define XC_SHM_H
typedef struct _xc_shm_handlers_t xc_shm_handlers_t;
#ifndef XC_SHM_IMPL
@ -65,3 +67,4 @@ const char *xc_shm_scheme_name(xc_shm_scheme_t *scheme);
xc_shm_t *xc_shm_init(const char *type, xc_shmsize_t size, int readonly_protection, const void *arg1, const void *arg2);
void xc_shm_destroy(xc_shm_t *shm);
#endif

85
xcache.c

@ -29,20 +29,9 @@
#include "stack.h"
#include "xcache_globals.h"
#include "processor.h"
#include "utils.h"
#include "const_string.h"
#include "opcode_spec.h"
#ifdef DEBUG
# undef NDEBUG
# undef inline
# define inline
#else
# ifndef NDEBUG
# define NDEBUG
# endif
#endif
#include <assert.h>
#include "utils.h"
#define VAR_ENTRY_EXPIRED(pentry) ((pentry)->ttl && XG(request_time) > pentry->ctime + (pentry)->ttl)
#define CHECK(x, e) do { if ((x) == NULL) { zend_error(E_ERROR, "XCache: " e); goto err; } } while (0)
@ -244,9 +233,7 @@ static xc_entry_t *xc_entry_find_dmz(xc_entry_t *xce TSRMLS_DC) /* {{{ */
/* }}} */
static void xc_entry_hold_php_dmz(xc_entry_t *xce TSRMLS_DC) /* {{{ */
{
#ifdef DEBUG
fprintf(stderr, "hold %s\n", xce->name.str.val);
#endif
TRACE("hold %s", xce->name.str.val);
xce->refcount ++;
xc_stack_push(&XG(php_holds)[xce->cache->cacheid], (void *)xce);
}
@ -291,9 +278,7 @@ static void xc_entry_apply_dmz(xc_cache_t *cache, cache_apply_dmz_func_t apply_f
*/
static XC_ENTRY_APPLY_FUNC(xc_gc_expires_php_entry_dmz) /* {{{ */
{
#ifdef DEBUG
fprintf(stderr, "ttl %lu, %lu %lu\n", (zend_ulong) XG(request_time), (zend_ulong) entry->atime, xc_php_ttl);
#endif
TRACE("ttl %lu, %lu %lu", (zend_ulong) XG(request_time), (zend_ulong) entry->atime, xc_php_ttl);
if (XG(request_time) > entry->atime + xc_php_ttl) {
return 1;
}
@ -310,9 +295,7 @@ static XC_ENTRY_APPLY_FUNC(xc_gc_expires_var_entry_dmz) /* {{{ */
/* }}} */
static void xc_gc_expires_one(xc_cache_t *cache, zend_ulong gc_interval, cache_apply_dmz_func_t apply_func TSRMLS_DC) /* {{{ */
{
#ifdef DEBUG
fprintf(stderr, "interval %lu, %lu %lu\n", (zend_ulong) XG(request_time), (zend_ulong) cache->last_gc_expires, gc_interval);
#endif
TRACE("interval %lu, %lu %lu", (zend_ulong) XG(request_time), (zend_ulong) cache->last_gc_expires, gc_interval);
if (XG(request_time) - cache->last_gc_expires >= gc_interval) {
ENTER_LOCK(cache) {
if (XG(request_time) - cache->last_gc_expires >= gc_interval) {
@ -629,17 +612,13 @@ static inline void xc_entry_unholds_real(xc_stack_t *holds, xc_cache_t **caches,
for (i = 0; i < cachecount; i ++) {
s = &holds[i];
#ifdef DEBUG
fprintf(stderr, "holded %d\n", xc_stack_size(s));
#endif
if (xc_stack_size(s)) {
TRACE("holded %d", xc_stack_count(s));
if (xc_stack_count(s)) {
cache = ((xc_entry_t *)xc_stack_top(s))->cache;
ENTER_LOCK(cache) {
while (xc_stack_size(s)) {
while (xc_stack_count(s)) {
xce = (xc_entry_t*) xc_stack_pop(s);
#ifdef DEBUG
fprintf(stderr, "unhold %s\n", xce->name.str.val);
#endif
TRACE("unhold %s", xce->name.str.val);
xce->refcount --;
assert(xce->refcount >= 0);
}
@ -828,9 +807,7 @@ static void xc_cache_early_binding_class_cb(zend_op *opline, int oplineno, void
if (zend_hash_find(CG(class_table), class_name, class_len, (void **) &cest) == FAILURE) {
assert(0);
}
#ifdef DEBUG
fprintf(stderr, "got ZEND_DECLARE_INHERITED_CLASS: %s\n", class_name + 1);
#endif
TRACE("got ZEND_DECLARE_INHERITED_CLASS: %s", class_name + 1);
/* let's see which class */
for (i = 0; i < php->classinfo_cnt; i ++) {
if (memcmp(ZSTR_S(php->classinfos[i].key), class_name, class_len) == 0) {
@ -914,9 +891,7 @@ static zend_op_array *xc_compile_file(zend_file_handle *h, int type TSRMLS_DC) /
stored_xce = xc_entry_find_dmz(&xce TSRMLS_CC);
/* found */
if (stored_xce) {
#ifdef DEBUG
fprintf(stderr, "found %s, catch it\n", stored_xce->name.str.val);
#endif
TRACE("found %s, catch it", stored_xce->name.str.val);
xc_entry_hold_php_dmz(stored_xce TSRMLS_CC);
cache->hits ++;
break;
@ -943,9 +918,7 @@ static zend_op_array *xc_compile_file(zend_file_handle *h, int type TSRMLS_DC) /
/* }}} */
/* {{{ compile */
#ifdef DEBUG
fprintf(stderr, "compiling %s\n", filename);
#endif
TRACE("compiling %s", filename);
/* make compile inside sandbox */
xc_sandbox_init(&sandbox, filename TSRMLS_CC);
@ -1124,9 +1097,7 @@ static zend_op_array *xc_compile_file(zend_file_handle *h, int type TSRMLS_DC) /
stored_xce = xc_entry_store_dmz(&xce TSRMLS_CC);
} LEAVE_LOCK_EX(cache);
/* }}} */
#ifdef DEBUG
fprintf(stderr, "stored\n");
#endif
TRACE("%s", "stored");
#define X_FREE(var) \
if (xce.data.php->var) { \
@ -1185,9 +1156,7 @@ restore:
CG(in_compilation) = 1;
CG(compiled_filename) = stored_xce->name.str.val;
CG(zend_lineno) = 0;
#ifdef DEBUG
fprintf(stderr, "restoring %s\n", stored_xce->name.str.val);
#endif
TRACE("restoring %s", stored_xce->name.str.val);
xc_processor_restore_xc_entry_t(&xce, stored_xce, xc_readonly_protection TSRMLS_CC);
#ifdef SHOW_DPRINT
xc_dprint(&xce, 0 TSRMLS_CC);
@ -1220,9 +1189,7 @@ restore:
}
CG(in_compilation) = 0;
CG(compiled_filename) = NULL;
#ifdef DEBUG
fprintf(stderr, "restored %s\n", stored_xce->name.str.val);
#endif
TRACE("restored %s", stored_xce->name.str.val);
return op_array;
}
/* }}} */
@ -2005,14 +1972,10 @@ static inline void xc_var_inc_dec(int inc, INTERNAL_FUNCTION_PARAMETERS) /* {{{
ENTER_LOCK(xce.cache) {
stored_xce = xc_entry_find_dmz(&xce TSRMLS_CC);
if (stored_xce) {
#ifdef DEBUG
fprintf(stderr, "incdec: gotxce %s\n", xce.name.str.val);
#endif
TRACE("incdec: gotxce %s", xce.name.str.val);
/* timeout */
if (VAR_ENTRY_EXPIRED(stored_xce)) {
#ifdef DEBUG
fprintf(stderr, "incdec: expired\n");
#endif
TRACE("%s", "incdec: expired");
xc_entry_remove_dmz(stored_xce TSRMLS_CC);
stored_xce = NULL;
}
@ -2023,9 +1986,7 @@ static inline void xc_var_inc_dec(int inc, INTERNAL_FUNCTION_PARAMETERS) /* {{{
zval *zv;
stored_xce->ctime = XG(request_time);
stored_xce->ttl = xce.ttl;
#ifdef DEBUG
fprintf(stderr, "incdec: islong\n");
#endif
TRACE("%s", "incdec: islong");
value = Z_LVAL_P(stored_var->value);
value += (inc == 1 ? count : - count);
RETVAL_LONG(value);
@ -2035,9 +1996,7 @@ static inline void xc_var_inc_dec(int inc, INTERNAL_FUNCTION_PARAMETERS) /* {{{
break; /* leave lock */
}
else {
#ifdef DEBUG
fprintf(stderr, "incdec: notlong\n");
#endif
TRACE("%s", "incdec: notlong");
xc_processor_restore_zval(&oldzval, stored_xce->data.var->value, stored_xce->have_references TSRMLS_CC);
convert_to_long(&oldzval);
value = Z_LVAL(oldzval);
@ -2045,11 +2004,9 @@ static inline void xc_var_inc_dec(int inc, INTERNAL_FUNCTION_PARAMETERS) /* {{{
}
}
}
#ifdef DEBUG
else {
fprintf(stderr, "incdec: %s not found\n", xce.name.str.val);
TRACE("incdec: %s not found", xce.name.str.val);
}
#endif
value += (inc == 1 ? count : - count);
RETVAL_LONG(value);
@ -2494,9 +2451,7 @@ static void xc_zend_extension_register(zend_extension *new_extension, DL_HANDLE
zend_extension_dispatch_message(ZEND_EXTMSG_NEW_EXTENSION, &extension);
zend_llist_prepend_element(&zend_extensions, &extension);
#ifdef DEBUG
fprintf(stderr, "registered\n");
#endif
TRACE("%s", "registered");
}
static zend_llist_element *xc_llist_get_element_by_zend_extension(zend_llist *l, const char *extension_name)

Loading…
Cancel
Save