Changeset 437 in svn for branches/1.2


Ignore:
Timestamp:
2007-06-30T07:33:30+02:00 (8 years ago)
Author:
Xuefer
Message:

copy internal table correctly, refix #59 which is broken by [429]

Location:
branches/1.2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2

    • Property svnmerge-integrated changed
      /trunkmerged: 435
  • branches/1.2/xcache.c

    r432 r437  
    14641464    int i;
    14651465
    1466     if (XG(internal_function_table).nTableSize == 0) {
     1466    if (!XG(internal_table_copied)) {
    14671467        zend_function tmp_func;
    14681468        xc_cest_t tmp_cest;
     
    14761476        zend_hash_copy(&XG(internal_function_table), CG(function_table), (copy_ctor_func_t) function_add_ref, &tmp_func, sizeof(tmp_func));
    14771477        zend_hash_copy(&XG(internal_class_table), CG(class_table), (copy_ctor_func_t) xc_zend_class_add_ref, &tmp_cest, sizeof(tmp_cest));
     1478
     1479        XG(internal_table_copied) = 1;
    14781480    }
    14791481    if (xc_php_hcache.size && !XG(php_holds)) {
     
    15251527    zend_hash_init_ex(&xcache_globals->internal_function_table, 1, NULL, NULL, 1, 0);
    15261528    zend_hash_init_ex(&xcache_globals->internal_class_table,    1, NULL, NULL, 1, 0);
    1527 
    15281529}
    15291530/* }}} */
     
    15541555    }
    15551556
    1556     zend_hash_destroy(&xcache_globals->internal_function_table);
    1557     zend_hash_destroy(&xcache_globals->internal_class_table);
     1557    if (XG(internal_table_copied)) {
     1558        zend_hash_destroy(&xcache_globals->internal_function_table);
     1559        zend_hash_destroy(&xcache_globals->internal_class_table);
     1560    }
    15581561}
    15591562/* }}} */
  • branches/1.2/xcache_globals.h

    r408 r437  
    2020    HashTable internal_function_table;
    2121    HashTable internal_class_table;
     22    zend_bool internal_table_copied;
    2223ZEND_END_MODULE_GLOBALS(xcache)
    2324
Note: See TracChangeset for help on using the changeset viewer.