Ignore:
Timestamp:
2013-11-12T10:46:04+01:00 (10 months ago)
Author:
moo
Message:

clean up shm handlers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/processor/foot.m4

    r1456 r1468  
    11define(`DEFINE_STORE_API', ` 
    2 EXPORTED_FUNCTION(`$1 *xc_processor_store_$1(xc_shm_t *shm, xc_allocator_t *allocator, $1 *src TSRMLS_DC)') dnl {{{ 
     2EXPORTED_FUNCTION(`$1 *xc_processor_store_$1(ptrdiff_t relocatediff, xc_allocator_t *allocator, $1 *src TSRMLS_DC)') dnl {{{ 
    33{ 
    44    $1 *dst; 
     
    66 
    77    memset(&processor, 0, sizeof(processor)); 
    8     processor.reference = 1; 
    9     processor.shm = shm; 
    10     processor.allocator = allocator; 
     8    processor.handle_reference = 1; 
     9    processor.relocatediff = relocatediff; 
    1110 
    1211    IFAUTOCHECK(`xc_stack_init(&processor.allocsizes);') 
     
    1413    /* calc size */ { 
    1514        zend_hash_init(&processor.strings, 0, NULL, NULL, 0); 
    16         if (processor.reference) { 
     15        if (processor.handle_reference) { 
    1716            zend_hash_init(&processor.zvalptrs, 0, NULL, NULL, 0); 
    1817        } 
     
    2322 
    2423        xc_calc_$1(&processor, src TSRMLS_CC); 
    25         if (processor.reference) { 
     24        if (processor.handle_reference) { 
    2625            zend_hash_destroy(&processor.zvalptrs); 
    2726        } 
     
    4140        IFAUTOCHECK(`char *oldp;') 
    4241        zend_hash_init(&processor.strings, 0, NULL, NULL, 0); 
    43         if (processor.reference) { 
     42        if (processor.handle_reference) { 
    4443            zend_hash_init(&processor.zvalptrs, 0, NULL, NULL, 0); 
    4544        } 
    4645 
    4746        /* allocator :) */ 
    48         processor.p = (char *) processor.allocator->vtable->malloc(processor.allocator, processor.size); 
     47        processor.p = (char *) allocator->vtable->malloc(allocator, processor.size); 
    4948        if (processor.p == NULL) { 
    5049            dst = NULL; 
     
    6867        }') 
    6968err_alloc: 
    70         if (processor.reference) { 
     69        if (processor.handle_reference) { 
    7170            zend_hash_destroy(&processor.zvalptrs); 
    7271        } 
     
    102101    /* this function is used for php data only */ 
    103102    if (SRC(`have_references')) { 
    104         processor.reference = 1; 
     103        processor.handle_reference = 1; 
    105104    } 
    106105    processor.entry_php_src = entry_php; 
    107106 
    108     if (processor.reference) { 
     107    if (processor.handle_reference) { 
    109108        zend_hash_init(&processor.zvalptrs, 0, NULL, NULL, 0); 
    110109    } 
    111110    xc_restore_xc_entry_data_php_t(&processor, dst, src TSRMLS_CC); 
    112     if (processor.reference) { 
     111    if (processor.handle_reference) { 
    113112        zend_hash_destroy(&processor.zvalptrs); 
    114113    } 
     
    121120 
    122121    memset(&processor, 0, sizeof(processor)); 
    123     processor.reference = have_references; 
     122    processor.handle_reference = have_references; 
    124123 
    125     if (processor.reference) { 
     124    if (processor.handle_reference) { 
    126125        zend_hash_init(&processor.zvalptrs, 0, NULL, NULL, 0); 
    127126        dnl fprintf(stderr, "mark[%p] = %p\n", src, dst); 
     
    129128    } 
    130129    xc_restore_zval(&processor, dst, src TSRMLS_CC); 
    131     if (processor.reference) { 
     130    if (processor.handle_reference) { 
    132131        zend_hash_destroy(&processor.zvalptrs); 
    133132    } 
Note: See TracChangeset for help on using the changeset viewer.