Changeset 961 in svn


Ignore:
Timestamp:
2012-07-11T04:16:56Z (3 years ago)
Author:
Xuefer
Message:

revert opt out of included_files handling. still required by require()/include(). make it work for new sandbox handling

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/utils.c

    r954 r961  
    585585    ZEND_24(NOTHING, const) char *filename;
    586586
    587 #ifndef ZEND_ENGINE_2_2
    588587    HashTable orig_included_files;
    589588    HashTable *tmp_included_files;
    590 #endif
    591589
    592590#ifdef HAVE_XCACHE_CONSTANT
     
    774772    memset(sandbox, 0, sizeof(sandbox[0]));
    775773
    776 #ifndef ZEND_ENGINE_2_2
    777774    memcpy(&OG(included_files), &EG(included_files), sizeof(EG(included_files)));
    778 #endif
    779775
    780776#ifdef HAVE_XCACHE_CONSTANT
     
    795791#endif
    796792
    797 #ifndef ZEND_ENGINE_2_2
    798793    TG(included_files) = &EG(included_files);
    799 #endif
    800 
    801 #ifndef ZEND_ENGINE_2_2
     794
    802795    zend_hash_init_ex(TG(included_files), 5, NULL, NULL, 0, 1);
    803 #endif
    804796#ifdef HAVE_XCACHE_CONSTANT
    805797    h = OG(zend_constants);
     
    934926#endif
    935927
    936 #ifndef ZEND_ENGINE_2_2
    937928    i = 1;
     929    /* still needed because in zend_language_scanner.l, require()/include() check file_handle.handle.stream.handle */
    938930    zend_hash_add(&OG(included_files), sandbox->filename, strlen(sandbox->filename) + 1, (void *)&i, sizeof(int), NULL);
    939 #endif
    940931}
    941932/* }}} */
     
    988979    zend_hash_destroy(&TG(auto_globals));
    989980#endif
    990 #ifndef ZEND_ENGINE_2_2
    991981    zend_hash_destroy(TG(included_files));
    992 #endif
    993 
    994 #ifndef ZEND_ENGINE_2_2
     982
    995983    /* restore orig here, as EG/CG holded tmp before */
    996984    memcpy(&EG(included_files), &OG(included_files), sizeof(EG(included_files)));
    997 #endif
    998985
    999986#ifdef XCACHE_ERROR_CACHING
  • trunk/xcache.c

    r960 r961  
    18481848    xc_entry_data_php_t restored_php;
    18491849    zend_bool catched;
     1850    zend_uint i;
     1851
     1852    /* still needed because in zend_language_scanner.l, require()/include() check file_handle.handle.stream.handle */
     1853    i = 1;
     1854    zend_hash_add(&EG(included_files), stored_entry->entry.name.str.val, stored_entry->entry.name.str.len + 1, (void *)&i, sizeof(int), NULL);
    18501855
    18511856    CG(in_compilation)    = 1;
Note: See TracChangeset for help on using the changeset viewer.