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


Ignore:
Timestamp:
2012-03-25T09:01:16+02:00 (3 years ago)
Author:
Xuefer
Message:

PHP_5_4: handle exclude_from_classes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/processor/main.m4

    r837 r843  
    2020define(`ZEND_STRS', `($1), (sizeof($1))')
    2121define(`ZEND_STRL', `($1), (sizeof($1) - 1)')
     22define(`DST', `dst->$1')
     23define(`SRC', `src->$1')
    2224dnl ============
    2325define(`INDENT', `xc_dprint_indent(indent);')
     
    8183    popdef(`SIZE')
    8284')
    83 dnl CALLOC(1:dst, 2:type [, 3:count=1 ])
    84 define(`CALLOC', `ALLOC(`$1', `$2', `$3', `1')')
    85 dnl }}}
    86 dnl {{{ PROC_INT(1:elm, 2:format=%d, 3:type=, 4:spec=)
    87 define(`PROC_INT', `
    88     IFNOTMEMCPY(`IFCOPY(`dst->$1 = src->$1;')')
    89     IFDPRINT(`
    90         INDENT()
    91         ifelse(
    92             `$3 $1', `zval_data_type type', `fprintf(stderr, "$3:$1:\t%d %s\n", src->$1, xc_get_data_type(src->$1));'
    93         , `$3 $1', `int op_type', `fprintf(stderr, "$3:$1:\t%d %s\n", src->$1, xc_get_op_type(src->$1));'
    94         , `$3 $1', `zend_uchar opcode', `fprintf(stderr, "$3:$1:\t%d %s\n", src->$1, xc_get_opcode(src->$1));'
    95         , `', `', `fprintf(stderr, "$3:$1:\t%ifelse(`$2',`',`d',`$2')\n", src->$1);')
    96     ')
    97     IFDASM(`
    98         ifelse(
    99             `$3', `zend_bool', `add_assoc_bool_ex(dst, ZEND_STRS("$1"), src->$1 ? 1 : 0);'
    100         , `', `', `add_assoc_long_ex(dst, ZEND_STRS("$1"), src->$1);'
    101         )
    102     ')
    103     DONE(`$1')
    104 ')
     85dnl CALLOC(1:dst, 2:type [, 3:count=1, 4:forcetype=$2 ])
     86define(`CALLOC', `ALLOC(`$1', `$2', `$3', `1', `$4')')
    10587dnl }}}
    10688dnl {{{ PROC_CLASS_ENTRY_P(1:elm)
    107 define(`PROC_CLASS_ENTRY_P', `PROC_CLASS_ENTRY_P_EX(`dst->$1', `src->$1', `$1')`'DONE(`$1')')
     89define(`PROC_CLASS_ENTRY_P', `PROC_CLASS_ENTRY_P_EX(`dst->$1', `SRC(`$1')', `$1')`'DONE(`$1')')
    10890dnl PROC_CLASS_ENTRY_P_EX(1:dst, 2:src, 3:elm-name)
    10991define(`PROC_CLASS_ENTRY_P_EX', `
     
    151133dnl }}}
    152134dnl {{{ COPY
    153 define(`COPY', `IFNOTMEMCPY(`IFCOPY(`dst->$1 = src->$1;')')DONE(`$1')')
     135define(`COPY', `IFNOTMEMCPY(`IFCOPY(`dst->$1 = SRC(`$1');')')DONE(`$1')')
    154136dnl }}}
    155137dnl {{{ COPY_N_EX
    156138define(`COPY_N_EX', `
    157     ALLOC(`dst->$3', `$2', `src->$1')
     139    ALLOC(`dst->$3', `$2', `SRC(`$1')')
    158140    IFCOPY(`
    159         memcpy(dst->$3, src->$3, sizeof(dst->$3[0]) * src->$1);
     141        memcpy(dst->$3, SRC(`$3'), sizeof(dst->$3[0]) * SRC(`$1'));
    160142        ')
    161143')
     
    168150dnl }}}
    169151dnl {{{ COPYARRAY_EX
    170 define(`COPYARRAY_EX', `IFNOTMEMCPY(`IFCOPY(`memcpy(dst->$1, src->$1, sizeof(dst->$1));')')')
     152define(`COPYARRAY_EX', `IFNOTMEMCPY(`IFCOPY(`memcpy(dst->$1, SRC(`$1'), sizeof(dst->$1));')')')
    171153dnl }}}
    172154dnl {{{ COPYARRAY
     
    226208        }
    227209    ')
    228     DONE_SIZE(`sizeof(src->$1)')
     210    DONE_SIZE(`sizeof(SRC(`$1'))')
    229211')
    230212define(`DISABLECHECK', `
     
    261243include(srcdir`/processor/string.m4')
    262244include(srcdir`/processor/struct.m4')
    263 include(srcdir`/processor/dispatch.m4')
     245include(srcdir`/processor/process.m4')
    264246include(srcdir`/processor/head.m4')
    265247
Note: See TracChangeset for help on using the changeset viewer.