Changeset 506
Legend:
- Unmodified
- Added
- Removed
-
trunk/processor/processor.m4
r505 r506 699 699 PROC_ZSTRING_N(type, key, key_size) 700 700 ') 701 DISPATCH(ulong, h) 701 702 STRUCT(zend_constant, constant) 702 703 ') … … 711 712 PROC_ZSTRING_N(type, key, key_size) 712 713 ') 714 DISPATCH(ulong, h) 713 715 STRUCT(zend_function, func) 714 716 ') … … 722 724 PROC_ZSTRING_N(type, key, key_size) 723 725 ') 726 DISPATCH(ulong, h) 724 727 #ifdef ZEND_ENGINE_2 725 728 STRUCT_P(zend_class_entry, cest) … … 739 742 PROC_ZSTRING_L(type, key, key_len) 740 743 ') 744 DISPATCH(ulong, h) 741 745 ') 742 746 dnl }}} -
trunk/utils.c
r504 r506 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) … … 685 685 zend_constant *c = (zend_constant*) b->pData; 686 686 xc_install_constant(sandbox->filename, c, 687 BUCKET_KEY_TYPE(b), ZSTR(BUCKET_KEY_S(b)), b->nKeyLength TSRMLS_CC);687 BUCKET_KEY_TYPE(b), ZSTR(BUCKET_KEY_S(b)), b->nKeyLength, b->h TSRMLS_CC); 688 688 b = b->pListNext; 689 689 } … … 695 695 zend_function *func = (zend_function*) b->pData; 696 696 xc_install_function(sandbox->filename, func, 697 BUCKET_KEY_TYPE(b), ZSTR(BUCKET_KEY_S(b)), b->nKeyLength TSRMLS_CC);697 BUCKET_KEY_TYPE(b), ZSTR(BUCKET_KEY_S(b)), b->nKeyLength, b->h TSRMLS_CC); 698 698 b = b->pListNext; 699 699 } … … 703 703 while (b != NULL) { 704 704 xc_install_class(sandbox->filename, (xc_cest_t*) b->pData, -1, 705 BUCKET_KEY_TYPE(b), ZSTR(BUCKET_KEY_S(b)), b->nKeyLength TSRMLS_CC);705 BUCKET_KEY_TYPE(b), ZSTR(BUCKET_KEY_S(b)), b->nKeyLength, b->h TSRMLS_CC); 706 706 b = b->pListNext; 707 707 } -
trunk/utils.h
r496 r506 72 72 /* installer */ 73 73 #ifdef HAVE_XCACHE_CONSTANT 74 void xc_install_constant(char *filename, zend_constant *constant, zend_uchar type, zstr key, uint len TSRMLS_DC);74 void xc_install_constant(char *filename, zend_constant *constant, zend_uchar type, zstr key, uint len, ulong h TSRMLS_DC); 75 75 #endif 76 void xc_install_function(char *filename, zend_function *func, zend_uchar type, zstr key, uint len TSRMLS_DC);77 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);76 void xc_install_function(char *filename, zend_function *func, zend_uchar type, zstr key, uint len, ulong h TSRMLS_DC); 77 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); 78 78 79 79 /* sandbox */ -
trunk/xcache.c
r504 r506 622 622 xc_constinfo_t *ci = &p->constinfos[i]; 623 623 xc_install_constant(xce->name.str.val, &ci->constant, 624 UNISW(0, ci->type), ci->key, ci->key_size TSRMLS_CC);624 UNISW(0, ci->type), ci->key, ci->key_size, ci->h TSRMLS_CC); 625 625 } 626 626 #endif … … 630 630 xc_funcinfo_t *fi = &p->funcinfos[i]; 631 631 xc_install_function(xce->name.str.val, &fi->func, 632 UNISW(0, fi->type), fi->key, fi->key_size TSRMLS_CC);632 UNISW(0, fi->type), fi->key, fi->key_size, fi->h TSRMLS_CC); 633 633 } 634 634 … … 647 647 #endif 648 648 xc_install_class(xce->name.str.val, &ci->cest, ci->oplineno, 649 UNISW(0, ci->type), ci->key, ci->key_size TSRMLS_CC);649 UNISW(0, ci->type), ci->key, ci->key_size, ci->h TSRMLS_CC); 650 650 } 651 651 … … 656 656 /* 657 657 zend_auto_global *auto_global; 658 if (zend_u_hash_ find(CG(auto_globals), aginfo->type, aginfo->key, aginfo->key_len+1, (void **) &auto_global)==SUCCESS) {658 if (zend_u_hash_quick_find(CG(auto_globals), aginfo->type, aginfo->key, aginfo->key_len+1, aginfo->h, (void **) &auto_global)==SUCCESS) { 659 659 if (auto_global->armed) { 660 660 auto_global->armed = auto_global->auto_global_callback(auto_global->name, auto_global->name_len TSRMLS_CC); … … 1087 1087 } \ 1088 1088 data->key_size = b->nKeyLength; \ 1089 data->h = b->h; \ 1089 1090 } \ 1090 1091 } while(0) … … 1119 1120 } 1120 1121 data->key_len = b->nKeyLength - 1; 1122 data->h = b->h; 1121 1123 } 1122 1124 } -
trunk/xcache.h
r500 r506 141 141 zend_hash_add(ht, arKey, nKeyLength, pData, nDataSize, pDest) 142 142 143 # define zend_u_hash_quick_add(ht, type, arKey, nKeyLength, h, pData, nDataSize, pDest) \ 144 zend_hash_quick_add(ht, arKey, nKeyLength, h, pData, nDataSize, pDest) 145 143 146 # define zend_u_hash_update(ht, type, arKey, nKeyLength, pData, nDataSize, pDest) \ 144 147 zend_hash_update(ht, arKey, nKeyLength, pData, nDataSize, pDest) 148 149 # define zend_u_hash_quick_update(ht, type, arKey, nKeyLength, h, pData, nDataSize, pDest) \ 150 zend_hash_quick_update(ht, arKey, nKeyLength, h, pData, nDataSize, pDest) 145 151 146 152 # define zend_u_hash_find(ht, type, arKey, nKeyLength, pData) \ … … 227 233 zstr key; 228 234 zend_uint key_size; 235 ulong h; 229 236 xc_cest_t cest; 230 237 int oplineno; … … 239 246 zstr key; 240 247 zend_uint key_size; 248 ulong h; 241 249 zend_constant constant; 242 250 } xc_constinfo_t; … … 250 258 zstr key; 251 259 zend_uint key_size; 260 ulong h; 252 261 zend_function func; 253 262 } xc_funcinfo_t; … … 261 270 zstr key; 262 271 zend_uint key_len; 272 ulong h; 263 273 } xc_autoglobal_t; 264 274 /* }}} */
Note: See TracChangeset
for help on using the changeset viewer.

