Changeset 149

Show
Ignore:
Timestamp:
02/07/06 15:02:03 (3 years ago)
Author:
hrak
Message:

* PHP_5_1: Fix for problems with autoload
* PHP_5_1: Fixed compile problems with thread-safe PHP

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • eaccelerator/branches/PHP_5_1/ChangeLog

    r148 r149  
     12006-02-07  Hans Rakers <hans at parse dot nl> 
     2 
     3        * PHP_5_1: Fix for problems with __autoload 
     4        * PHP_5_1: Fixed compile problems with thread-safe PHP 
     5 
    162006-02-06  Hans Rakers <hans at parse dot nl> 
    27 
  • eaccelerator/branches/PHP_5_1/ea_restore.c

    r148 r149  
    535535         */ 
    536536        if (from->scope_name != NULL) { 
    537                 zend_class_entry** scope_ptr = NULL
    538                 if (zend_lookup_class(from->scope_name, from->scope_name_len, &scope_ptr TSRMLS_CC) != SUCCESS) { 
     537                char *from_scope_lc = zend_str_tolower_dup(from->scope_name, from->scope_name_len)
     538                if (zend_hash_find (CG(class_table), (void *) from_scope_lc, from->scope_name_len + 1, (void **) &to->scope) != SUCCESS) { 
    539539                        ea_debug_pad(EA_DEBUG TSRMLS_CC); 
    540540                        ea_debug_printf(EA_DEBUG, "[%d]                   can't find '%s' in class_table. use EAG(class_entry).\n", getpid(), from->scope_name); 
     
    543543                        ea_debug_pad(EA_DEBUG TSRMLS_CC); 
    544544                        ea_debug_printf(EA_DEBUG, "[%d]                   found '%s' in hash\n", getpid(), from->scope_name); 
    545                         to->scope = *scope_ptr; 
    546                 } 
    547         } else {                                        // zoeloelip: is this needed? scope is always stored 
     545                        to->scope = *(zend_class_entry **) to->scope; 
     546                } 
     547                efree(from_scope_lc); 
     548        } else {                                        // zoeloelip: is this needed? scope is always stored -> hra: no its not :P only if from->scope!=null in ea_store 
    548549                ea_debug_pad(EA_DEBUG TSRMLS_CC); 
    549550                ea_debug_printf(EA_DEBUG, "[%d]                   from is NULL\n", getpid());  
     
    726727                to->parent = *parent_ptr; 
    727728                ea_debug_printf(EA_DEBUG, "restore_class_parent: found parent %s..\n", to->parent->name); 
    728                 ea_debug_printf(EA_DEBUG, "restore_class_parent: parent type=%d child type=%d waa=%x\n", to->parent->type, to->type, CE_STATIC_MEMBERS(*parent_ptr)); 
     729                ea_debug_printf(EA_DEBUG, "restore_class_parent: parent type=%d child type=%d\n", to->parent->type, to->type); 
    729730                zend_do_inheritance(to, to->parent TSRMLS_CC); 
    730731                to->parent->refcount++; 
     
    861862        } 
    862863 
    863 /*      if (from->parent != NULL) { 
    864                 restore_class_parent(from->parent, strlen(from->parent), to TSRMLS_CC); 
    865         } else { 
    866                 ea_debug_pad(EA_DEBUG TSRMLS_CC); 
    867                 ea_debug_printf(EA_DEBUG, "[%d] parent = NULL\n", getpid()); 
    868                 to->parent = NULL; 
    869         }*/ 
    870  
    871864        old = EAG(class_entry); 
    872865        EAG(class_entry) = to; 
     
    877870        to->line_start = from->line_start; 
    878871        to->line_end = from->line_end; 
    879         ea_debug_printf(EA_DEBUG, "restore_class_entry: line_start=%d, line_end=%d", to->line_start, to->line_end); 
    880872        to->doc_comment_len = from->doc_comment_len; 
    881873/*      if (from->filename != NULL) { 
     
    906898        to->default_static_members.pDestructor = ZVAL_PTR_DTOR; 
    907899         
    908         ea_debug_printf(EA_DEBUG, "restore_class_entry: static_members=%x, default_static_members=%x", from->static_members, &from->default_static_members); 
     900        ea_debug_printf(EA_DEBUG, "restore_class_entry: static_members=%x, default_static_members=%x\n", from->static_members, &from->default_static_members); 
    909901        if (from->static_members != &(from->default_static_members)) { 
    910902                ALLOC_HASHTABLE(to->static_members); 
     
    914906                to->static_members = &(to->default_static_members); 
    915907        } 
    916         ea_debug_printf(EA_DEBUG, "restore_class_entry: to->static_members=%x, to->default_static_members=%x", to->static_members, &to->default_static_members); 
     908        ea_debug_printf(EA_DEBUG, "restore_class_entry: to->static_members=%x, to->default_static_members=%x\n", to->static_members, &to->default_static_members); 
    917909#  else 
    918910        if (from->static_members != NULL) { 
  • eaccelerator/branches/PHP_5_1/ea_store.c

    r148 r149  
    411411{ 
    412412        Bucket *p, *np, *prev_p; 
     413        TSRMLS_FETCH(); 
    413414 
    414415        memcpy(target, source, sizeof(HashTable));