Changeset 619 for branches/1.3/xcache.c


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

merged r498 from trunk

Location:
branches/1.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3

    • Property svn:mergeinfo changed
      /trunkmerged: 498
  • 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);
Note: See TracChangeset for help on using the changeset viewer.