Changeset 1446 in svn for trunk/processor/main.m4


Ignore:
Timestamp:
2013-11-07T09:44:15+01:00 (20 months ago)
Author:
Xuefer
Message:

update relocate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/processor/main.m4

    r1444 r1446  
    2626dnl }}}
    2727dnl {{{ SRCPTR_EX(1:type, 2:elm)
    28 define(`SRCPTR_EX', `IFRELOCATE(`(($1 *) (((char *) $2) + 1))', `$2')')
     28define(`SRCPTR_EX', `IFRELOCATE(`(($1 *) (((char *) $2) + ptrdiff))', `$2')')
    2929dnl }}}
    3030dnl {{{ ALLOC(1:dst, 2:type, 3:count=1, 4:clean=false, 5:realtype=$2)
     
    139139define(`FIXPOINTER_EX', `
    140140    IFSTORE(`$2 = ($1 *) processor->shm->handlers->to_readonly(processor->shm, (void *)$2);')
    141     IFRELOCATE(`patsubst($2, `dst', `src') = ($1 *) (((char *) patsubst($2, `dst', `src')) + 1);')
     141    IFRELOCATE(`
     142        pushdef(`relocatee', `patsubst($2, `dst', `src')')
     143        relocatee = ($1 *) (((char *) relocatee) + relocatediff);
     144        popdef(`relocatee')
     145    ')
    142146')
    143147dnl }}}
Note: See TracChangeset for help on using the changeset viewer.