Changeset 640 for trunk/xcache.c


Ignore:
Timestamp:
2009-07-05T16:43:38+02:00 (5 years ago)
Author:
moo
Message:

copy only internal constant, clean constant on shutdown

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xcache.c

    r638 r640  
    18541854 
    18551855    if (!XG(internal_table_copied)) { 
    1856 #ifdef HAVE_XCACHE_CONSTANT 
    1857         zend_constant tmp_const; 
    1858 #endif 
    18591856        zend_function tmp_func; 
    18601857        xc_cest_t tmp_cest; 
     
    18671864 
    18681865#ifdef HAVE_XCACHE_CONSTANT 
    1869         zend_hash_init_ex(&XG(internal_constant_table), 20,  NULL, NULL, 1, 0); 
     1866        zend_hash_init_ex(&XG(internal_constant_table), 20,  NULL, (dtor_func_t) xc_zend_constant_dtor, 1, 0); 
    18701867#endif 
    18711868        zend_hash_init_ex(&XG(internal_function_table), 100, NULL, NULL, 1, 0); 
     
    18731870 
    18741871#ifdef HAVE_XCACHE_CONSTANT 
    1875         zend_hash_copy(&XG(internal_constant_table), EG(zend_constants), (copy_ctor_func_t) xc_copy_zend_constant, &tmp_const, sizeof(tmp_const)); 
     1872        xc_copy_internal_zend_constants(&XG(internal_constant_table), EG(zend_constants)); 
    18761873#endif 
    18771874        zend_hash_copy(&XG(internal_function_table), CG(function_table), NULL, &tmp_func, sizeof(tmp_func)); 
     
    19341931 
    19351932#ifdef HAVE_XCACHE_CONSTANT 
    1936     zend_hash_init_ex(&xcache_globals->internal_constant_table, 1, NULL, NULL, 1, 0); 
     1933    zend_hash_init_ex(&xcache_globals->internal_constant_table, 1, NULL, (dtor_func_t) xc_zend_constant_dtor, 1, 0); 
    19371934#endif 
    19381935    zend_hash_init_ex(&xcache_globals->internal_function_table, 1, NULL, NULL, 1, 0); 
Note: See TracChangeset for help on using the changeset viewer.