Ignore:
Timestamp:
2013-11-08T10:30:06+01:00 (12 months ago)
Author:
moo
Message:

relocate: update proto to like memcpy/store/restore, update test code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mod_cacher/xc_cacher.c

    r1453 r1455  
    182182        xc_entry_data_php_t *backup = malloc(stored_php->size); 
    183183        fprintf(stderr, "%lu\n", stored_php->size); 
    184         memcpy(p, stored_php, stored_php->size); 
    185184        memcpy(backup, stored_php, stored_php->size); 
    186         xc_processor_relocate_xc_entry_data_php_t(stored_php, stored_php, p, 0 TSRMLS_CC); 
    187         assert(memcmp(stored_php, backup, stored_php->size) == 0); 
    188  
    189         memcpy(stored_php, p, p->size); 
    190         xc_processor_relocate_xc_entry_data_php_t(p, 0, stored_php, stored_php TSRMLS_CC); 
     185 
     186        { 
     187            memcpy(p, stored_php, stored_php->size); 
     188            xc_processor_relocate_xc_entry_data_php_t(p, p , stored_php, stored_php TSRMLS_CC); 
     189            assert(memcmp(stored_php, backup, stored_php->size) == 0); 
     190 
     191            memcpy(stored_php, p, p->size); 
     192            xc_processor_relocate_xc_entry_data_php_t(stored_php, stored_php, p, p TSRMLS_CC); 
     193        } 
     194 
     195        { 
     196            memcpy(p, stored_php, stored_php->size); 
     197            xc_processor_relocate_xc_entry_data_php_t(p, 0, stored_php, stored_php TSRMLS_CC); 
     198            assert(memcmp(stored_php, backup, stored_php->size) == 0); 
     199 
     200            memcpy(stored_php, p, p->size); 
     201            xc_processor_relocate_xc_entry_data_php_t(stored_php, stored_php, p, 0 TSRMLS_CC); 
     202        } 
    191203    } 
    192204#endif 
Note: See TracChangeset for help on using the changeset viewer.