Changeset 622 for branches/1.3/utils.c


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

merged r504:513 from trunk

Location:
branches/1.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3

  • branches/1.3/utils.c

    r617 r622  
    425425 
    426426#ifdef HAVE_XCACHE_CONSTANT 
    427 void xc_install_constant(char *filename, zend_constant *constant, zend_uchar type, zstr key, uint len TSRMLS_DC) /* {{{ */ 
     427void xc_install_constant(char *filename, zend_constant *constant, zend_uchar type, zstr key, uint len, ulong h TSRMLS_DC) /* {{{ */ 
    428428{ 
    429429    if (zend_u_hash_add(EG(zend_constants), type, key, len, 
     
    445445/* }}} */ 
    446446#endif 
    447 void xc_install_function(char *filename, zend_function *func, zend_uchar type, zstr key, uint len TSRMLS_DC) /* {{{ */ 
     447void xc_install_function(char *filename, zend_function *func, zend_uchar type, zstr key, uint len, ulong h TSRMLS_DC) /* {{{ */ 
    448448{ 
    449449    zend_bool istmpkey; 
     
    475475} 
    476476/* }}} */ 
    477 ZESW(xc_cest_t *, void) xc_install_class(char *filename, xc_cest_t *cest, int oplineno, zend_uchar type, zstr key, uint len TSRMLS_DC) /* {{{ */ 
     477ZESW(xc_cest_t *, void) xc_install_class(char *filename, xc_cest_t *cest, int oplineno, zend_uchar type, zstr key, uint len, ulong h TSRMLS_DC) /* {{{ */ 
    478478{ 
    479479    zend_bool istmpkey; 
     
    487487#endif 
    488488    if (istmpkey) { 
    489         zend_u_hash_update(CG(class_table), type, key, len, 
     489        zend_u_hash_quick_update(CG(class_table), type, key, len, h, 
    490490                    cest, sizeof(xc_cest_t), 
    491491                    ZESW(&stored_ce_ptr, NULL) 
     
    495495        } 
    496496    } 
    497     else if (zend_u_hash_add(CG(class_table), type, key, len, 
     497    else if (zend_u_hash_quick_add(CG(class_table), type, key, len, h, 
    498498                cest, sizeof(xc_cest_t), 
    499499                ZESW(&stored_ce_ptr, NULL) 
     
    541541#endif 
    542542 
    543 void xc_zend_class_add_ref(zend_class_entry ZESW(*ce, **ce)) 
    544 { 
    545 #ifdef ZEND_ENGINE_2 
    546     (*ce)->refcount++; 
    547 #else 
    548     (*ce->refcount)++; 
    549 #endif 
    550 } 
    551  
    552543xc_sandbox_t *xc_sandbox_init(xc_sandbox_t *sandbox, char *filename TSRMLS_DC) /* {{{ */ 
    553544{ 
     
    592583    { 
    593584        zend_function tmp_func; 
    594         zend_hash_copy(&TG(function_table), &XG(internal_function_table), (copy_ctor_func_t) function_add_ref, (void *) &tmp_func, sizeof(tmp_func)); 
     585        zend_hash_copy(&TG(function_table), &XG(internal_function_table), NULL, (void *) &tmp_func, sizeof(tmp_func)); 
    595586    } 
    596587    TG(internal_function_tail) = TG(function_table).pListTail; 
     
    601592    { 
    602593        xc_cest_t tmp_cest; 
    603         zend_hash_copy(&TG(class_table), &XG(internal_class_table), (copy_ctor_func_t) xc_zend_class_add_ref, (void *) &tmp_cest, sizeof(tmp_cest)); 
     594        zend_hash_copy(&TG(class_table), &XG(internal_class_table), NULL, (void *) &tmp_cest, sizeof(tmp_cest)); 
    604595    } 
    605596#endif 
     
    645636        zend_constant *c = (zend_constant*) b->pData; 
    646637        xc_install_constant(sandbox->filename, c, 
    647                 BUCKET_KEY_TYPE(b), ZSTR(BUCKET_KEY_S(b)), b->nKeyLength TSRMLS_CC); 
     638                BUCKET_KEY_TYPE(b), ZSTR(BUCKET_KEY_S(b)), b->nKeyLength, b->h TSRMLS_CC); 
    648639        b = b->pListNext; 
    649640    } 
     
    655646        zend_function *func = (zend_function*) b->pData; 
    656647        xc_install_function(sandbox->filename, func, 
    657                 BUCKET_KEY_TYPE(b), ZSTR(BUCKET_KEY_S(b)), b->nKeyLength TSRMLS_CC); 
     648                BUCKET_KEY_TYPE(b), ZSTR(BUCKET_KEY_S(b)), b->nKeyLength, b->h TSRMLS_CC); 
    658649        b = b->pListNext; 
    659650    } 
     
    663654    while (b != NULL) { 
    664655        xc_install_class(sandbox->filename, (xc_cest_t*) b->pData, -1, 
    665                 BUCKET_KEY_TYPE(b), ZSTR(BUCKET_KEY_S(b)), b->nKeyLength TSRMLS_CC); 
     656                BUCKET_KEY_TYPE(b), ZSTR(BUCKET_KEY_S(b)), b->nKeyLength, b->h TSRMLS_CC); 
    666657        b = b->pListNext; 
    667658    } 
Note: See TracChangeset for help on using the changeset viewer.