Ignore:
Timestamp:
2013-05-10T19:52:02+02:00 (20 months ago)
Author:
moo
Message:

fixes #296: Multiple instances of the same software causes PHP "cannot redeclare class" errors when xcache enabled

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/processor/processor.m4

    r1232 r1238  
    728728        zend_bool gc_arg_info = 0; 
    729729        zend_bool gc_opcodes  = 0; 
     730#ifdef ZEND_ENGINE_2_4 
     731        zend_bool gc_literals = 0; 
     732#endif 
    730733        /* really fast shallow copy */ 
    731734        memcpy(dst, src, sizeof(src[0])); 
     
    744747        dst->filename = processor->entry_php_src->filepath; 
    745748#ifdef ZEND_ENGINE_2_4 
    746         if (src->literals /* || op_array_info->literalsinfo_cnt */) { 
     749        if (src->literals) { 
    747750            gc_opcodes = 1; 
     751            if (op_array_info->literalinfo_cnt) { 
     752                gc_literals = 1; 
     753            } 
    748754        } 
    749755#else 
    750756        if (op_array_info->oplineinfo_cnt) { 
    751757            gc_opcodes = 1; 
     758        } 
     759#endif 
     760#ifdef ZEND_ENGINE_2_4 
     761        if (gc_literals) { 
     762            dnl used when copying opcodes 
     763            COPY_N_EX(last_literal, zend_literal, literals) 
    752764        } 
    753765#endif 
     
    801813            } 
    802814        } 
    803         if (gc_arg_info || gc_opcodes) { 
     815        if (gc_arg_info || gc_opcodes || gc_literals) { 
    804816            xc_gc_op_array_t gc_op_array; 
    805817#ifdef ZEND_ENGINE_2 
     
    808820#endif 
    809821            gc_op_array.opcodes  = gc_opcodes ? dst->opcodes : NULL; 
     822#ifdef ZEND_ENGINE_2_4 
     823            gc_op_array.literals = gc_literals ? dst->literals : NULL; 
     824#endif 
    810825            xc_gc_add_op_array(&gc_op_array TSRMLS_CC); 
    811826        } 
Note: See TracChangeset for help on using the changeset viewer.