Changeset 11

Show
Ignore:
Timestamp:
06/12/09 11:13:50 (15 months ago)
Author:
sesser
Message:

Fixing problem cause by zend_bailout() on parse error

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/bytekit.c

    r10 r11  
    16681668    HashTable *dependencies = NULL; 
    16691669    long flags = 0; 
     1670    zend_execute_data *orig_execute_data; 
    16701671 
    16711672    if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|zz", &zfilename, &zerrors, &zoptions) == FAILURE) { 
     
    17191720            zend_hash_get_current_data(dependencies, (void **)&zdependency) == SUCCESS; 
    17201721            zend_hash_move_forward(dependencies)) { 
    1721                  
     1722             
     1723            orig_execute_data = EG(current_execute_data); 
     1724             
    17221725            zend_try { 
    17231726                ops = compile_filename(ZEND_INCLUDE, *zdependency TSRMLS_CC); 
     
    17251728                ops = NULL; 
    17261729            } zend_end_try(); 
     1730             
     1731            EG(current_execute_data) = orig_execute_data; 
    17271732         
    17281733            /* in case of an error clean up and exit */ 
     
    17471752    dependencies_num_classes = zend_hash_num_elements(EG(class_table)); 
    17481753 
     1754    orig_execute_data = EG(current_execute_data); 
     1755     
    17491756    zend_try { 
    17501757         
     
    17561763        file_handle.opened_path = NULL; 
    17571764        file_handle.handle.fp = NULL; 
    1758                  
     1765         
    17591766        ops = zend_compile_file(&file_handle, ZEND_INCLUDE TSRMLS_CC); 
    17601767     
     
    17641771        ops = NULL; 
    17651772    } zend_end_try(); 
     1773     
     1774    EG(current_execute_data) = orig_execute_data; 
     1775     
    17661776     
    17671777    /* this is again not 100% thread-safe but better than nothing */ 
  • trunk/php_bytekit.h

    r8 r11  
    2222#define PHP_BYTEKIT_H 
    2323 
    24 #define BYTEKIT_VERSION "0.1.0" 
     24#define BYTEKIT_VERSION "0.1.1" 
    2525 
    2626#ifdef ZTS