Changeset 622 for branches/1.3/utils.c
- Timestamp:
- 07/05/2009 10:18:06 AM (4 years ago)
- Location:
- branches/1.3
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3
-
branches/1.3/utils.c
r617 r622 425 425 426 426 #ifdef HAVE_XCACHE_CONSTANT 427 void xc_install_constant(char *filename, zend_constant *constant, zend_uchar type, zstr key, uint len TSRMLS_DC) /* {{{ */427 void xc_install_constant(char *filename, zend_constant *constant, zend_uchar type, zstr key, uint len, ulong h TSRMLS_DC) /* {{{ */ 428 428 { 429 429 if (zend_u_hash_add(EG(zend_constants), type, key, len, … … 445 445 /* }}} */ 446 446 #endif 447 void xc_install_function(char *filename, zend_function *func, zend_uchar type, zstr key, uint len TSRMLS_DC) /* {{{ */447 void xc_install_function(char *filename, zend_function *func, zend_uchar type, zstr key, uint len, ulong h TSRMLS_DC) /* {{{ */ 448 448 { 449 449 zend_bool istmpkey; … … 475 475 } 476 476 /* }}} */ 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) /* {{{ */477 ZESW(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) /* {{{ */ 478 478 { 479 479 zend_bool istmpkey; … … 487 487 #endif 488 488 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, 490 490 cest, sizeof(xc_cest_t), 491 491 ZESW(&stored_ce_ptr, NULL) … … 495 495 } 496 496 } 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, 498 498 cest, sizeof(xc_cest_t), 499 499 ZESW(&stored_ce_ptr, NULL) … … 541 541 #endif 542 542 543 void xc_zend_class_add_ref(zend_class_entry ZESW(*ce, **ce))544 {545 #ifdef ZEND_ENGINE_2546 (*ce)->refcount++;547 #else548 (*ce->refcount)++;549 #endif550 }551 552 543 xc_sandbox_t *xc_sandbox_init(xc_sandbox_t *sandbox, char *filename TSRMLS_DC) /* {{{ */ 553 544 { … … 592 583 { 593 584 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)); 595 586 } 596 587 TG(internal_function_tail) = TG(function_table).pListTail; … … 601 592 { 602 593 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)); 604 595 } 605 596 #endif … … 645 636 zend_constant *c = (zend_constant*) b->pData; 646 637 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); 648 639 b = b->pListNext; 649 640 } … … 655 646 zend_function *func = (zend_function*) b->pData; 656 647 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); 658 649 b = b->pListNext; 659 650 } … … 663 654 while (b != NULL) { 664 655 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); 666 657 b = b->pListNext; 667 658 }

