Changeset 641 in svn for branches/1.3/xcache.c


Ignore:
Timestamp:
2009-07-05T14:56:27Z (6 years ago)
Author:
Xuefer
Message:

merged r637,r634,r640 from trunk

Location:
branches/1.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3

  • branches/1.3/xcache.c

    r639 r641  
    15851585}
    15861586/* }}} */
    1587 static void xc_copy_zend_constant(zend_constant *c) /* {{{ */
    1588 {
    1589     c->name = zend_strndup(c->name, c->name_len - 1);
    1590     if (!(c->flags & CONST_PERSISTENT)) {
    1591         zval_copy_ctor(&c->value);
    1592     }
    1593 }
    1594 /* }}} */
    15951587static void xc_request_init(TSRMLS_D) /* {{{ */
    15961588{
     
    15981590
    15991591    if (!XG(internal_table_copied)) {
    1600 #ifdef HAVE_XCACHE_CONSTANT
    1601         zend_constant tmp_const;
    1602 #endif
    16031592        zend_function tmp_func;
    16041593        xc_cest_t tmp_cest;
     
    16111600
    16121601#ifdef HAVE_XCACHE_CONSTANT
    1613         zend_hash_init_ex(&XG(internal_constant_table), 20,  NULL, NULL, 1, 0);
     1602        zend_hash_init_ex(&XG(internal_constant_table), 20,  NULL, (dtor_func_t) xc_zend_constant_dtor, 1, 0);
    16141603#endif
    16151604        zend_hash_init_ex(&XG(internal_function_table), 100, NULL, NULL, 1, 0);
     
    16171606
    16181607#ifdef HAVE_XCACHE_CONSTANT
    1619         zend_hash_copy(&XG(internal_constant_table), EG(zend_constants), (copy_ctor_func_t) xc_copy_zend_constant, &tmp_const, sizeof(tmp_const));
     1608        xc_copy_internal_zend_constants(&XG(internal_constant_table), EG(zend_constants));
    16201609#endif
    16211610        zend_hash_copy(&XG(internal_function_table), CG(function_table), NULL, &tmp_func, sizeof(tmp_func));
     
    16781667
    16791668#ifdef HAVE_XCACHE_CONSTANT
    1680     zend_hash_init_ex(&xcache_globals->internal_constant_table, 1, NULL, NULL, 1, 0);
     1669    zend_hash_init_ex(&xcache_globals->internal_constant_table, 1, NULL, (dtor_func_t) xc_zend_constant_dtor, 1, 0);
    16811670#endif
    16821671    zend_hash_init_ex(&xcache_globals->internal_function_table, 1, NULL, NULL, 1, 0);
     
    19581947        default:
    19591948#ifdef IS_UNICODE
    1960             convert_to_text(name);
     1949            convert_to_unicode(name);
    19611950#else
    19621951            convert_to_string(name);
Note: See TracChangeset for help on using the changeset viewer.