1
0
Fork 0

fix build by avoing nested macro with ifdef

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@690 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 13 years ago
parent cc74546430
commit c65bcccb7a

@ -134,6 +134,12 @@ static inline int xc_zstrlen(int type, zstr s)
#endif
/* {{{ xc_calc_string_n */
REDEF(`KIND', `calc')
#undef C_RELAYLINE
#define C_RELAYLINE
IFASSERT(`
#undef C_RELAYLINE
#define C_RELAYLINE , __LINE__
')
static inline void xc_calc_string_n(xc_processor_t *processor, zend_uchar type, const zstr str, long size IFASSERT(`, int relayline')) {
pushdef(`__LINE__', `relayline')
int realsize = UNISW(size, (type == IS_UNICODE) ? UBYTES(size) : size);

@ -121,8 +121,11 @@ define(`PROC_CLASS_ENTRY_P_EX', `
}
')
dnl }}}
dnl {{{ IFASSERTEX
define(`IFASSERTEX', `ifdef(`XCACHE_ENABLE_TEST', `$1', `$2')')
dnl }}}
dnl {{{ IFASSERT
define(`IFASSERT', `ifdef(`XCACHE_ENABLE_TEST', `
define(`IFASSERT', `IFASSERTEX(`
#ifndef NDEBUG
$1
#endif

@ -58,8 +58,8 @@ define(`PROC_STRING_N_EX', `
fprintf(stderr, "\" len=%d\n", $3 - 1);
')
')
IFCALC(`xc_calc_string_n(processor, ISTYPE, SRCSTR, $3 IFASSERT(`, __LINE__'));')
IFSTORE(`DSTPTR = ifelse(PTRTYPE,`char',`ZSTR_S',`ZSTR_U')(xc_store_string_n(processor, ISTYPE, SRCSTR, $3 IFASSERT(`, __LINE__')));')
IFCALC(`xc_calc_string_n(processor, ISTYPE, SRCSTR, $3 C_RELAYLINE);')
IFSTORE(`DSTPTR = ifelse(PTRTYPE,`char',`ZSTR_S',`ZSTR_U')(xc_store_string_n(processor, ISTYPE, SRCSTR, $3 C_RELAYLINE));')
IFRESTORE(`
DSTPTR = e`'U`'strndup(SRCPTR, ($3) - 1);
')

Loading…
Cancel
Save