Changeset 485 in svn for trunk/xcache.c


Ignore:
Timestamp:
2007-12-28T11:16:12+01:00 (8 years ago)
Author:
Xuefer
Message:

5.3 support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xcache.c

    r477 r485  
    609609    xc_entry_data_php_t *p = xce->data.php;
    610610    zend_op_array *old_active_op_array = CG(active_op_array);
     611    ALLOCA_FLAG(use_heap)
     612
    611613#ifndef ZEND_ENGINE_2
    612614    /* new ptr which is stored inside CG(class_table) */
    613     xc_cest_t **new_cest_ptrs = (xc_cest_t **)do_alloca(sizeof(xc_cest_t*) * p->classinfo_cnt);
     615    xc_cest_t **new_cest_ptrs = (xc_cest_t **)my_do_alloca(sizeof(xc_cest_t*) * p->classinfo_cnt, use_heap);
    614616#endif
    615617
     
    672674
    673675#ifndef ZEND_ENGINE_2
    674     free_alloca(new_cest_ptrs);
     676    my_free_alloca(new_cest_ptrs, use_heap);
    675677#endif
    676678    CG(active_op_array) = old_active_op_array;
     
    716718    int size = strlen(include_path) + 1;
    717719    char tokens[] = { DEFAULT_DIR_SEPARATOR, '\0' };
    718 
    719     paths = (char *)do_alloca(size);
     720    ALLOCA_FLAG(use_heap)
     721
     722    paths = (char *)my_do_alloca(size, use_heap);
    720723    memcpy(paths, include_path, size);
    721724
     
    725728        }
    726729        if (VCWD_STAT(filepath, pbuf) == 0) {
    727             free_alloca(paths);
     730            my_free_alloca(paths, use_heap);
    728731            return SUCCESS;
    729732        }
    730733    }
    731734
    732     free_alloca(paths);
     735    my_free_alloca(paths, use_heap);
    733736
    734737    return FAILURE;
     
    888891    php_stream     *stream;
    889892    xc_hash_value_t hv;
     893    ulong           old_rsid = EG(regular_list).nNextFreeElement;
    890894
    891895    stream = php_stream_open_wrapper(xce->name.str.val, "rb", USE_PATH | REPORT_ERRORS | ENFORCE_SAFE_MODE | STREAM_DISABLE_OPEN_BASEDIR, NULL);
     
    901905
    902906    php_stream_close(stream);
     907    if (EG(regular_list).nNextFreeElement = old_rsid + 1) {
     908        EG(regular_list).nNextFreeElement = old_rsid;
     909    }
    903910
    904911    if (n < 0) {
Note: See TracChangeset for help on using the changeset viewer.