Changeset 120
- Timestamp:
- 07/09/05 13:10:52 (3 years ago)
- Files:
-
- eaccelerator/trunk/ChangeLog (modified) (1 diff)
- eaccelerator/trunk/debug.c (modified) (1 diff)
- eaccelerator/trunk/debug.h (modified) (1 diff)
- eaccelerator/trunk/ea_restore.c (modified) (14 diffs)
- eaccelerator/trunk/ea_store.c (modified) (4 diffs)
- eaccelerator/trunk/eaccelerator.c (modified) (6 diffs)
- eaccelerator/trunk/win32/eAccelerator.sln (modified) (1 diff)
- eaccelerator/trunk/win32/eAccelerator.vcproj (modified) (4 diffs)
- eaccelerator/trunk/win32/eLoader.vcproj (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
eaccelerator/trunk/ChangeLog
r119 r120 4 4 * Removed atexit code that only produced segfaults and didn't work 5 5 (Patch from Rob Foehl <rwf at loonybin.net>) 6 * Code clean up and compile fixes for VC.net + VC.net project files update 7 (Based on patch #1234919) 6 8 7 9 2005-07-07 Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> eaccelerator/trunk/debug.c
r113 r120 109 109 110 110 #ifdef ZEND_WIN32 111 OutputDebugString (* buffer);111 OutputDebugString (*output_buf); 112 112 #else 113 113 fputs (output_buf, stderr); eaccelerator/trunk/debug.h
r113 r120 58 58 void ea_debug_init (TSRMLS_D); 59 59 void ea_debug_shutdown (); 60 void ea_debug_printf (long debug_level, char *format, ...); 60 61 void ea_debug_error (char *format, ...); 61 62 void ea_debug_pad (long debug_level TSRMLS_DC); eaccelerator/trunk/ea_restore.c
r116 r120 256 256 fixup_hash (&from->function_table, 257 257 (fixup_bucket_t) fixup_op_array TSRMLS_CC); 258 }259 260 void eaccelerator_fixup (mm_cache_entry * p TSRMLS_DC)261 {262 mm_fc_entry *q;263 264 MMCG (mem) = (char *) ((long) p - (long) p->next);265 MMCG (compress) = 1;266 p->next = NULL;267 FIXUP (p->op_array);268 FIXUP (p->f_head);269 FIXUP (p->c_head);270 fixup_op_array (p->op_array TSRMLS_CC);271 q = p->f_head;272 while (q != NULL) {273 FIXUP (q->fc);274 fixup_op_array ((eaccelerator_op_array *) q->fc TSRMLS_CC);275 FIXUP (q->next);276 q = q->next;277 }278 q = p->c_head;279 while (q != NULL) {280 FIXUP (q->fc);281 fixup_class_entry ((eaccelerator_class_entry *) q->fc TSRMLS_CC);282 FIXUP (q->next);283 q = q->next;284 }285 258 } 286 259 … … 469 442 #endif 470 443 471 ea_debug_pad (EA_DEBUG TSRMLS_C );444 ea_debug_pad (EA_DEBUG TSRMLS_CC); 472 445 ea_debug_printf (EA_DEBUG, "[%d] restore_op_array: %s\n", getpid (), 473 446 from->function_name ? from->function_name : "(top)"); … … 565 538 (CG (class_table), (void *) from_scope_lc, from->scope_name_len + 1, 566 539 (void **) &to->scope) != SUCCESS) { 567 ea_debug_pad (EA_DEBUG TSRMLS_C );540 ea_debug_pad (EA_DEBUG TSRMLS_CC); 568 541 ea_debug_printf (EA_DEBUG, 569 542 "[%d] can't find '%s' in hash. use MMCG(class_entry).\n", … … 571 544 to->scope = MMCG (class_entry); 572 545 } else { 573 ea_debug_pad (EA_DEBUG TSRMLS_C );546 ea_debug_pad (EA_DEBUG TSRMLS_CC); 574 547 ea_debug_printf (EA_DEBUG, 575 548 "[%d] found '%s' in hash\n", … … 579 552 efree (from_scope_lc); 580 553 } else { 581 ea_debug_pad (EA_DEBUG TSRMLS_C );554 ea_debug_pad (EA_DEBUG TSRMLS_CC); 582 555 ea_debug_printf (EA_DEBUG, "[%d] from is NULL\n", 583 556 getpid ()); … … 586 559 587 560 for (p = MMCG (class_entry)->parent; p; p = p->parent) { 588 ea_debug_pad (EA_DEBUG TSRMLS_C );561 ea_debug_pad (EA_DEBUG TSRMLS_CC); 589 562 ea_debug_printf (EA_DEBUG, 590 563 "[%d] checking parent '%s' have '%s'\n", … … 593 566 (&p->function_table, fname_lc, fname_len + 1, 594 567 (void **) &function) == SUCCESS) { 595 ea_debug_pad (EA_DEBUG TSRMLS_C );568 ea_debug_pad (EA_DEBUG TSRMLS_CC); 596 569 ea_debug_printf (EA_DEBUG, 597 570 "[%d] '%s' has '%s' of scope '%s'\n", … … 606 579 } 607 580 608 ea_debug_pad (EA_DEBUG TSRMLS_C );581 ea_debug_pad (EA_DEBUG TSRMLS_CC); 609 582 ea_debug_printf (EA_DEBUG, "[%d] %s's scope is '%s'\n", 610 583 getpid (), … … 614 587 if (from->type == ZEND_INTERNAL_FUNCTION) { 615 588 zend_class_entry *ce = MMCG (class_entry); 616 ea_debug_pad (EA_DEBUG TSRMLS_C );589 ea_debug_pad (EA_DEBUG TSRMLS_CC); 617 590 ea_debug_printf (EA_DEBUG, 618 591 "[%d] [internal function from=%08x,to=%08x] ce='%s' [%08x]\n", 619 592 getpid (), from, to, ce->name, ce); 620 593 if (ce) { 621 ea_debug_pad (EA_DEBUG TSRMLS_C );594 ea_debug_pad (EA_DEBUG TSRMLS_CC); 622 595 ea_debug_printf (EA_DEBUG, 623 596 "[%d] ce->parent='%s' [%08x]\n", … … 635 608 (void **) &function) == 636 609 SUCCESS && function->type == ZEND_INTERNAL_FUNCTION) { 637 ea_debug_pad (EA_DEBUG TSRMLS_C );610 ea_debug_pad (EA_DEBUG TSRMLS_CC); 638 611 ea_debug_printf (EA_DEBUG, 639 612 "[%d] found in function table\n", … … 647 620 * damaged structure... 648 621 */ 649 ea_debug_pad (EA_DEBUG TSRMLS_C );622 ea_debug_pad (EA_DEBUG TSRMLS_CC); 650 623 ea_debug_printf (EA_DEBUG, 651 624 "[%d] can't find\n", … … 731 704 { 732 705 zend_class_entry *old; 733 zend_function *f ;734 int fname_len ;735 char *fname_lc ;706 zend_function *f = NULL; 707 int fname_len = 0; 708 char *fname_lc = NULL; 736 709 #ifdef ZEND_ENGINE_2 737 710 int cname_len; … … 741 714 #endif 742 715 743 ea_debug_pad (EA_DEBUG TSRMLS_C );716 ea_debug_pad (EA_DEBUG TSRMLS_CC); 744 717 ea_debug_printf (EA_DEBUG, "[%d] retore_class_entry: %s\n", getpid (), 745 718 from->name ? from->name : "(top)"); … … 839 812 #endif 840 813 } else { 841 ea_debug_pad (EA_DEBUG TSRMLS_C );814 ea_debug_pad (EA_DEBUG TSRMLS_CC); 842 815 ea_debug_printf (EA_DEBUG, "[%d] parent = NULL\n", getpid ()); 843 816 to->parent = NULL; eaccelerator/trunk/ea_store.c
r118 r120 549 549 zend_op *end; 550 550 551 ea_debug_pad (EA_DEBUG TSRMLS_C );551 ea_debug_pad (EA_DEBUG TSRMLS_CC); 552 552 ea_debug_printf (EA_DEBUG, "[%d] store_op_array: %s [scope=%s]\n", 553 553 getpid (), … … 637 637 to->scope_name_len = q->nKeyLength - 1; 638 638 639 ea_debug_pad (EA_DEBUG TSRMLS_C );639 ea_debug_pad (EA_DEBUG TSRMLS_CC); 640 640 ea_debug_printf (EA_DEBUG, 641 641 "[%d] find scope '%s' in CG(class_table) save hashkey '%s' [%08x] as to->scope_name\n", … … 648 648 } 649 649 if (to->scope_name == NULL) { 650 ea_debug_pad (EA_DEBUG TSRMLS_C );650 ea_debug_pad (EA_DEBUG TSRMLS_CC); 651 651 ea_debug_printf (EA_DEBUG, 652 652 "[%d] could not find scope '%s' in CG(class_table), saving it to NULL\n", … … 798 798 #endif 799 799 800 ea_debug_pad (EA_DEBUG TSRMLS_C );800 ea_debug_pad (EA_DEBUG TSRMLS_CC); 801 801 ea_debug_printf (EA_DEBUG, "[%d] store_class_entry: %s parent was '%s'\n", 802 802 getpid (), from->name ? from->name : "(top)", eaccelerator/trunk/eaccelerator.c
r119 r120 560 560 } 561 561 562 void eaccelerator_fixup (mm_cache_entry * p TSRMLS_DC) 563 { 564 mm_fc_entry *q; 565 566 MMCG (mem) = (char *) ((long) p - (long) p->next); 567 MMCG (compress) = 1; 568 p->next = NULL; 569 FIXUP (p->op_array); 570 FIXUP (p->f_head); 571 FIXUP (p->c_head); 572 fixup_op_array (p->op_array TSRMLS_CC); 573 q = p->f_head; 574 while (q != NULL) { 575 FIXUP (q->fc); 576 fixup_op_array ((eaccelerator_op_array *) q->fc TSRMLS_CC); 577 FIXUP (q->next); 578 q = q->next; 579 } 580 q = p->c_head; 581 while (q != NULL) { 582 FIXUP (q->fc); 583 fixup_class_entry ((eaccelerator_class_entry *) q->fc TSRMLS_CC); 584 FIXUP (q->next); 585 q = q->next; 586 } 587 } 588 562 589 /******************************************************************************/ 563 590 /* Cache file functions. */ … … 717 744 char *x; 718 745 719 ea_debug_pad (EA_DEBUG TSRMLS_C );746 ea_debug_pad (EA_DEBUG TSRMLS_CC); 720 747 ea_debug_printf (EA_DEBUG, "[%d] eaccelerator_store_int: key='%s'\n", 721 748 getpid (), key); … … 737 764 q = NULL; 738 765 while (c != NULL) { 739 ea_debug_pad (EA_DEBUG TSRMLS_C );766 ea_debug_pad (EA_DEBUG TSRMLS_CC); 740 767 ea_debug_printf (EA_DEBUG, 741 768 "[%d] eaccelerator_store_int: class hashkey=", getpid ()); … … 767 794 q = NULL; 768 795 while (f != NULL) { 769 ea_debug_pad (EA_DEBUG TSRMLS_C );796 ea_debug_pad (EA_DEBUG TSRMLS_CC); 770 797 ea_debug_printf (EA_DEBUG, 771 798 "[%d] eaccelerator_store_int: function hashkey='%s'\n", getpid (), f->arKey); … … 1272 1299 HashTable* orig_function_table; 1273 1300 HashTable* orig_class_table; 1274 HashTable* orig_eg_class_table ;1301 HashTable* orig_eg_class_table = NULL; 1275 1302 HashTable tmp_function_table; 1276 1303 HashTable tmp_class_table; … … 1976 2003 #if defined(WITH_EACCELERATOR_SESSIONS) && defined(HAVE_PHP_SESSIONS_SUPPORT) 1977 2004 if (!eaccelerator_session_registered()) { 1978 eaccelerator_register_session();2005 eaccelerator_register_session(); 1979 2006 } 1980 2007 #endif eaccelerator/trunk/win32/eAccelerator.sln
r74 r120 10 10 Global 11 11 GlobalSection(SolutionConfiguration) = preSolution 12 Debug = Debug12 Debug PHP4 = Debug PHP4 13 13 Debug PHP5 = Debug PHP5 14 Release = Release14 Release PHP4 = Release PHP4 15 15 Release PHP5 = Release PHP5 16 16 EndGlobalSection 17 17 GlobalSection(ProjectConfiguration) = postSolution 18 {9CB8051E-B608-430D-B6AA-D763031A94B7}.Debug .ActiveCfg = Debug|Win3219 {9CB8051E-B608-430D-B6AA-D763031A94B7}.Debug .Build.0 = Debug|Win3218 {9CB8051E-B608-430D-B6AA-D763031A94B7}.Debug PHP4.ActiveCfg = Debug|Win32 19 {9CB8051E-B608-430D-B6AA-D763031A94B7}.Debug PHP4.Build.0 = Debug|Win32 20 20 {9CB8051E-B608-430D-B6AA-D763031A94B7}.Debug PHP5.ActiveCfg = Debug PHP5|Win32 21 21 {9CB8051E-B608-430D-B6AA-D763031A94B7}.Debug PHP5.Build.0 = Debug PHP5|Win32 22 {9CB8051E-B608-430D-B6AA-D763031A94B7}.Release .ActiveCfg = Release|Win3223 {9CB8051E-B608-430D-B6AA-D763031A94B7}.Release .Build.0 = Release|Win3222 {9CB8051E-B608-430D-B6AA-D763031A94B7}.Release PHP4.ActiveCfg = Release|Win32 23 {9CB8051E-B608-430D-B6AA-D763031A94B7}.Release PHP4.Build.0 = Release|Win32 24 24 {9CB8051E-B608-430D-B6AA-D763031A94B7}.Release PHP5.ActiveCfg = Release PHP5|Win32 25 25 {9CB8051E-B608-430D-B6AA-D763031A94B7}.Release PHP5.Build.0 = Release PHP5|Win32 26 {5FCBC0AF-2EBB-461F-9971-9272472602E7}.Debug .ActiveCfg = Debug|Win3227 {5FCBC0AF-2EBB-461F-9971-9272472602E7}.Debug .Build.0 = Debug|Win3226 {5FCBC0AF-2EBB-461F-9971-9272472602E7}.Debug PHP4.ActiveCfg = Debug|Win32 27 {5FCBC0AF-2EBB-461F-9971-9272472602E7}.Debug PHP4.Build.0 = Debug|Win32 28 28 {5FCBC0AF-2EBB-461F-9971-9272472602E7}.Debug PHP5.ActiveCfg = Debug PHP5|Win32 29 29 {5FCBC0AF-2EBB-461F-9971-9272472602E7}.Debug PHP5.Build.0 = Debug PHP5|Win32 30 {5FCBC0AF-2EBB-461F-9971-9272472602E7}.Release .ActiveCfg = Release|Win3231 {5FCBC0AF-2EBB-461F-9971-9272472602E7}.Release .Build.0 = Release|Win3230 {5FCBC0AF-2EBB-461F-9971-9272472602E7}.Release PHP4.ActiveCfg = Release|Win32 31 {5FCBC0AF-2EBB-461F-9971-9272472602E7}.Release PHP4.Build.0 = Release|Win32 32 32 {5FCBC0AF-2EBB-461F-9971-9272472602E7}.Release PHP5.ActiveCfg = Release PHP5|Win32 33 33 {5FCBC0AF-2EBB-461F-9971-9272472602E7}.Release PHP5.Build.0 = Release PHP5|Win32 eaccelerator/trunk/win32/eAccelerator.vcproj
r74 r120 79 79 </Configuration> 80 80 <Configuration 81 Name="Release |Win32"81 Name="Release PHP4|Win32" 82 82 OutputDirectory=".\Release" 83 83 IntermediateDirectory=".\Release" … … 145 145 </Configuration> 146 146 <Configuration 147 Name="Debug |Win32"147 Name="Debug PHP4|Win32" 148 148 OutputDirectory=".\Debug" 149 149 IntermediateDirectory=".\Debug" … … 292 292 RelativePath="..\debug.c"> 293 293 </File> 294 <File 295 RelativePath="..\ea_restore.c"> 296 </File> 297 <File 298 RelativePath="..\ea_store.c"> 299 </File> 294 300 <File 295 301 RelativePath="..\eaccelerator.c"> … … 335 341 RelativePath="..\debug.h"> 336 342 </File> 343 <File 344 RelativePath="..\ea_restore.h"> 345 </File> 346 <File 347 RelativePath="..\ea_store.h"> 348 </File> 337 349 <File 338 350 RelativePath="..\eaccelerator.h"> eaccelerator/trunk/win32/eLoader.vcproj
r33 r120 79 79 </Configuration> 80 80 <Configuration 81 Name="Release |Win32"81 Name="Release PHP4|Win32" 82 82 OutputDirectory=".\Release" 83 83 IntermediateDirectory=".\Release" … … 211 211 </Configuration> 212 212 <Configuration 213 Name="Debug |Win32"213 Name="Debug PHP4|Win32" 214 214 OutputDirectory=".\Debug" 215 215 IntermediateDirectory=".\Debug"