Changeset 548 for trunk/utils.c


Ignore:
Timestamp:
2008-03-21T15:36:17+01:00 (7 years ago)
Author:
moo
Message:

PHP_5_3 support: uses ZEND_COMPILE_IGNORE_INTERNAL_CLASSES and ZEND_COMPILE_DELAYED_BINDING stuffs for PHP_5_3 support finally

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/utils.c

    r545 r548  
    500500                    ZESW(&stored_ce_ptr, NULL)
    501501                    );
     502#ifndef ZEND_COMPILE_DELAYED_BINDING
    502503        if (oplineno != -1) {
    503504            xc_do_early_binding(CG(active_op_array), CG(class_table), oplineno TSRMLS_CC);
    504505        }
     506#endif
    505507    }
    506508    else if (zend_u_hash_quick_add(CG(class_table), type, key, len, h,
     
    673675#endif
    674676
     677#ifdef ZEND_COMPILE_IGNORE_INTERNAL_CLASSES
     678    sandbox->orig_compiler_options = CG(compiler_options);
     679    /* Using ZEND_COMPILE_IGNORE_INTERNAL_CLASSES for ZEND_FETCH_CLASS_RT_NS_CHECK
     680     */
     681    CG(compiler_options) |= ZEND_COMPILE_IGNORE_INTERNAL_CLASSES | ZEND_COMPILE_DELAYED_BINDING;
     682#endif
     683
    675684    XG(sandbox) = (void *) sandbox;
    676685    return sandbox;
     
    728737
    729738    if (install != XC_InstallNoBinding) {
     739#ifdef ZEND_COMPILE_DELAYED_BINDING
     740        zend_do_delayed_early_binding(CG(active_op_array) TSRMLS_CC);
     741#else
    730742        xc_undo_pass_two(CG(active_op_array) TSRMLS_CC);
    731743        xc_foreach_early_binding_class(CG(active_op_array), xc_early_binding_cb, (void *) sandbox TSRMLS_CC);
    732744        xc_redo_pass_two(CG(active_op_array) TSRMLS_CC);
     745#endif
    733746    }
    734747
     
    805818    }
    806819#endif
     820
     821#ifdef ZEND_COMPILE_IGNORE_INTERNAL_CLASSES
     822    CG(compiler_options) = sandbox->orig_compiler_options;
     823#endif
     824
    807825    if (sandbox->alloc) {
    808826        efree(sandbox);
Note: See TracChangeset for help on using the changeset viewer.