Changeset 348
- Timestamp:
- 06/20/08 11:20:17 (5 months ago)
- Files:
-
- eaccelerator/trunk/ChangeLog (modified) (1 diff)
- eaccelerator/trunk/ea_restore.c (modified) (4 diffs)
- eaccelerator/trunk/ea_store.c (modified) (3 diffs)
- eaccelerator/trunk/eaccelerator.c (modified) (2 diffs)
- eaccelerator/trunk/eaccelerator.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
eaccelerator/trunk/ChangeLog
r344 r348 1 2008-05-18 Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> 1 2008-05-20 Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> 2 3 * First stab at php 5.3 support. Only fixes the script cache. 4 phpMyAdmin seems to work with these changes. 5 6 2008-05-19 Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> 2 7 3 8 * Remove support for all php versions older than php 5.1 eaccelerator/trunk/ea_restore.c
r344 r348 50 50 #endif 51 51 52 #ifdef ZEND_ENGINE_2_3 53 #define RESET_PZVAL_REFCOUNT(z) Z_SET_REFCOUNT_P(z, 1) 54 #else 55 #define RESET_PZVAL_REFCOUNT(z) (z)->refcount = 1; 56 #endif 57 52 58 /* pointer to the properties_info hashtable destructor */ 53 59 dtor_func_t properties_info_dtor = NULL; … … 277 283 restore_zval(p TSRMLS_CC); 278 284 /* hrak: reset refcount to make sure there is one reference to this val, and prevent memleaks */ 279 p->refcount = 1;285 RESET_PZVAL_REFCOUNT(p); 280 286 return p; 281 287 } … … 539 545 to->try_catch_array = from->try_catch_array; 540 546 to->last_try_catch = from->last_try_catch; 547 #ifdef ZEND_ENGINE_2_3 548 to->this_var = from->this_var; 549 #else 541 550 to->uses_this = from->uses_this; 551 #endif 542 552 543 553 to->line_start = from->line_start; … … 556 566 Bucket *p = to->static_variables->pListHead; 557 567 while (p != NULL) { 558 ((zval *) (p->pDataPtr))->refcount = 1;568 RESET_PZVAL_REFCOUNT((zval*) p->pDataPtr); 559 569 p = p->pListNext; 560 570 } eaccelerator/trunk/ea_store.c
r344 r348 47 47 inline 48 48 #endif 49 #ifdef ZEND_ENGINE_2_3 50 static size_t calc_string(const char *str, int len TSRMLS_DC) 51 #else 49 52 static size_t calc_string(char *str, int len TSRMLS_DC) 53 #endif 50 54 { 51 55 if (len > MAX_DUP_STR_LEN || … … 324 328 EACCELERATOR_ALIGN((*at)); 325 329 330 #ifdef ZEND_ENGINE_2_3 331 static inline char *store_string(char **at, const char *str, int len TSRMLS_DC) 332 #else 326 333 static inline char *store_string(char **at, char *str, int len TSRMLS_DC) 334 #endif 327 335 { 328 336 char *p; … … 553 561 to->try_catch_array = from->try_catch_array; 554 562 to->last_try_catch = from->last_try_catch; 563 #ifdef ZEND_ENGINE_2_3 564 to->this_var = from->this_var; 565 #else 555 566 to->uses_this = from->uses_this; 567 #endif 556 568 if (from->try_catch_array != NULL) { 557 569 to->try_catch_array = (zend_try_catch_element *)ALLOCATE(at, sizeof(zend_try_catch_element) * from->last_try_catch); eaccelerator/trunk/eaccelerator.c
r347 r348 1103 1103 } 1104 1104 1105 /* copy of zend_class_add_ref, the linker isn't able to link to it any more 1106 * in php 5.3 1107 * TODO: see if we can steal the pointer 1108 */ 1109 void ea_class_add_ref(zend_class_entry **ce) 1110 { 1111 (*ce)->refcount++; 1112 } 1113 1105 1114 /* 1106 1115 * Intercept compilation of PHP file. If we already have the file in … … 1224 1233 1225 1234 zend_hash_init_ex(&tmp_class_table, 10, NULL, ZEND_CLASS_DTOR, 1, 0); 1226 zend_hash_copy(&tmp_class_table, &eaccelerator_global_class_table, (copy_ctor_func_t) zend_class_add_ref, &tmp_class, sizeof(zend_class_entry *));1235 zend_hash_copy(&tmp_class_table, &eaccelerator_global_class_table, (copy_ctor_func_t)ea_class_add_ref, &tmp_class, sizeof(zend_class_entry *)); 1227 1236 1228 1237 orig_class_table = CG(class_table);; eaccelerator/trunk/eaccelerator.h
r344 r348 198 198 typedef struct _eaccelerator_op_array { 199 199 zend_uchar type; 200 #ifdef ZEND_ENGINE_2_3 201 zend_uint this_var; 202 #else 200 203 zend_bool uses_this; 204 #endif 201 205 zend_bool return_reference; 202 206 zend_uint num_args;