Changeset 619 for branches/1.3


Ignore:
Timestamp:
2009-07-05T10:01:36+02:00 (5 years ago)
Author:
moo
Message:

merged r498 from trunk

Location:
branches/1.3
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3

    • Property svn:mergeinfo changed
      /trunkmerged: 498
  • branches/1.3/processor/processor.m4

    r618 r619  
    504504    dnl readonly_protection=on 
    505505    dnl main op_array && have early binding 
     506    zend_uint ii; 
    506507    if (!processor->readonly_protection && !(src == processor->xce_src->data.php->op_array && processor->xce_src->data.php->have_early_binding)) { 
    507508        /* really fast shallow copy */ 
     
    510511        /* deep */ 
    511512        STRUCT_P(HashTable, static_variables, HashTable_zval_ptr) 
     513        STRUCT_ARRAY_I(num_args, zend_arg_info, arg_info) 
     514        xc_gc_add_op_array(dst TSRMLS_CC); 
    512515        define(`SKIPASSERT_ONCE') 
    513516    } 
  • branches/1.3/xcache.c

    r617 r619  
    12661266/* }}} */ 
    12671267 
     1268/* {{{ xc_gc_op_array_t */ 
     1269typedef struct { 
     1270    zend_uint num_args; 
     1271    zend_arg_info *arg_info; 
     1272} xc_gc_op_array_t; 
     1273/* }}} */ 
     1274void xc_gc_add_op_array(zend_op_array *op_array TSRMLS_DC) /* {{{ */ 
     1275{ 
     1276    xc_gc_op_array_t gc_op_array; 
     1277    gc_op_array.num_args = op_array->num_args; 
     1278    gc_op_array.arg_info = op_array->arg_info; 
     1279    zend_hash_next_index_insert(&XG(gc_op_arrays), (void *) &gc_op_array, sizeof(gc_op_array), NULL); 
     1280} 
     1281/* }}} */ 
     1282static void xc_gc_op_array(void *pDest) /* {{{ */ 
     1283{ 
     1284    xc_gc_op_array_t *op_array = (xc_gc_op_array_t *) pDest; 
     1285    zend_uint i; 
     1286    if (op_array->arg_info) { 
     1287        for (i = 0; i < op_array->num_args; i++) { 
     1288            efree((char*)op_array->arg_info[i].name); 
     1289            if (op_array->arg_info[i].class_name) { 
     1290                efree((char*)op_array->arg_info[i].class_name); 
     1291            } 
     1292        } 
     1293        efree(op_array->arg_info); 
     1294    } 
     1295} 
     1296/* }}} */ 
     1297 
    12681298/* module helper function */ 
    12691299static int xc_init_constant(int module_number TSRMLS_DC) /* {{{ */ 
     
    14951525    } 
    14961526 
     1527    zend_hash_init(&XG(gc_op_arrays), 32, NULL, xc_gc_op_array, 0); 
     1528 
    14971529#if PHP_API_VERSION <= 20041225 
    14981530    XG(request_time) = time(NULL); 
     
    15091541{ 
    15101542    xc_entry_unholds(TSRMLS_C); 
     1543    zend_hash_destroy(&XG(gc_op_arrays)); 
    15111544    xc_gc_expires_php(TSRMLS_C); 
    15121545    xc_gc_expires_var(TSRMLS_C); 
  • branches/1.3/xcache.h

    r618 r619  
    331331int xc_is_ro(const void *p); 
    332332int xc_is_shm(const void *p); 
     333void xc_gc_add_op_array(zend_op_array *op_array TSRMLS_DC); 
    333334 
    334335#endif /* __XCACHE_H */ 
  • branches/1.3/xcache_globals.h

    r437 r619  
    1818    zend_bool auth_enabled; 
    1919 
     20    HashTable gc_op_arrays; 
     21 
    2022    HashTable internal_function_table; 
    2123    HashTable internal_class_table; 
Note: See TracChangeset for help on using the changeset viewer.