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


Ignore:
Timestamp:
2009-07-05T10:18:06+02:00 (6 years ago)
Author:
Xuefer
Message:

merged r504:513 from trunk

Location:
branches/1.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3

  • branches/1.3/xcache.c

    r620 r622  
    556556        xc_constinfo_t *ci = &p->constinfos[i];
    557557        xc_install_constant(xce->name.str.val, &ci->constant,
    558                 UNISW(0, ci->type), ci->key, ci->key_size TSRMLS_CC);
     558                UNISW(0, ci->type), ci->key, ci->key_size, ci->h TSRMLS_CC);
    559559    }
    560560#endif
     
    564564        xc_funcinfo_t  *fi = &p->funcinfos[i];
    565565        xc_install_function(xce->name.str.val, &fi->func,
    566                 UNISW(0, fi->type), fi->key, fi->key_size TSRMLS_CC);
     566                UNISW(0, fi->type), fi->key, fi->key_size, fi->h TSRMLS_CC);
    567567    }
    568568
     
    581581#endif
    582582        xc_install_class(xce->name.str.val, &ci->cest, ci->oplineno,
    583                 UNISW(0, ci->type), ci->key, ci->key_size TSRMLS_CC);
     583                UNISW(0, ci->type), ci->key, ci->key_size, ci->h TSRMLS_CC);
    584584    }
    585585
     
    590590        /*
    591591        zend_auto_global *auto_global;
    592         if (zend_u_hash_find(CG(auto_globals), aginfo->type, aginfo->key, aginfo->key_len+1, (void **) &auto_global)==SUCCESS) {
     592        if (zend_u_hash_quick_find(CG(auto_globals), aginfo->type, aginfo->key, aginfo->key_len+1, aginfo->h, (void **) &auto_global)==SUCCESS) {
    593593            if (auto_global->armed) {
    594594                auto_global->armed = auto_global->auto_global_callback(auto_global->name, auto_global->name_len TSRMLS_CC);
     
    10641064        }                                                     \
    10651065        data->key_size   = b->nKeyLength;                     \
     1066        data->h          = b->h;                              \
    10661067    }                                                         \
    10671068} while(0)
     
    10961097                }
    10971098                data->key_len = b->nKeyLength - 1;
     1099                data->h       = b->h;
    10981100            }
    10991101        }
     
    12661268/* }}} */
    12671269
     1270#ifdef ZEND_ENGINE_2
    12681271/* {{{ xc_gc_op_array_t */
    12691272typedef struct {
     
    12771280    gc_op_array.num_args = op_array->num_args;
    12781281    gc_op_array.arg_info = op_array->arg_info;
     1282#ifdef ZEND_ENGINE_2
    12791283    zend_hash_next_index_insert(&XG(gc_op_arrays), (void *) &gc_op_array, sizeof(gc_op_array), NULL);
     1284#endif
    12801285}
    12811286/* }}} */
     
    12951300}
    12961301/* }}} */
     1302#endif
    12971303
    12981304/* module helper function */
     
    15011507        zend_hash_destroy(&XG(internal_class_table));
    15021508
    1503         zend_hash_init_ex(&XG(internal_function_table), 100, NULL, CG(function_table)->pDestructor, 1, 0);
    1504         zend_hash_init_ex(&XG(internal_class_table),    10,  NULL, CG(class_table)->pDestructor,    1, 0);
    1505 
    1506         zend_hash_copy(&XG(internal_function_table), CG(function_table), (copy_ctor_func_t) function_add_ref, &tmp_func, sizeof(tmp_func));
    1507         zend_hash_copy(&XG(internal_class_table), CG(class_table), (copy_ctor_func_t) xc_zend_class_add_ref, &tmp_cest, sizeof(tmp_cest));
     1509        zend_hash_init_ex(&XG(internal_function_table), 100, NULL, NULL, 1, 0);
     1510        zend_hash_init_ex(&XG(internal_class_table),    10,  NULL, NULL, 1, 0);
     1511
     1512        zend_hash_copy(&XG(internal_function_table), CG(function_table), NULL, &tmp_func, sizeof(tmp_func));
     1513        zend_hash_copy(&XG(internal_class_table), CG(class_table), NULL, &tmp_cest, sizeof(tmp_cest));
    15081514
    15091515        XG(internal_table_copied) = 1;
     
    15231529    }
    15241530
     1531#ifdef ZEND_ENGINE_2
    15251532    zend_hash_init(&XG(gc_op_arrays), 32, NULL, xc_gc_op_array, 0);
     1533#endif
    15261534
    15271535#if PHP_API_VERSION <= 20041225
     
    15391547{
    15401548    xc_entry_unholds(TSRMLS_C);
     1549#ifdef ZEND_ENGINE_2
    15411550    zend_hash_destroy(&XG(gc_op_arrays));
     1551#endif
    15421552    xc_gc_expires_php(TSRMLS_C);
    15431553    xc_gc_expires_var(TSRMLS_C);
Note: See TracChangeset for help on using the changeset viewer.