From 07ed4d4bd6e7cc6958b6ea257f2e7cfa1469e279 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Fri, 27 Jul 2012 14:47:56 +0200 Subject: [PATCH] Refactor the macro FT_RETURN_TRUE() into the function S_ft_return_true() This makes the true and false code paths as similar as possible. It also eliminates a macro that the HP compiler was choking on. --- pp_sys.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pp_sys.c b/pp_sys.c index e7163ac..667715a 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -2928,18 +2928,18 @@ S_ft_return_false(pTHX_ SV *ret) { #define FT_RETURN_FALSE(X) \ return S_ft_return_false(aTHX_ X) #define FT_RETURN_TRUE(X) \ - STMT_START { \ - dSP; \ - (void)( \ - PL_op->op_flags & OPf_REF \ - ? (bool)XPUSHs( \ - PL_op->op_private & OPpFT_STACKING ? (SV *)cGVOP_gv : (X) \ - ) \ - : (PL_op->op_private & OPpFT_STACKING || SETs(X)) \ - ); \ - PUTBACK; \ - return NORMAL; \ - } STMT_END + return S_ft_return_true(aTHX_ X) + +PERL_STATIC_INLINE OP * +S_ft_return_true(pTHX_ SV *ret) { + dSP; + if (PL_op->op_flags & OPf_REF) + XPUSHs(PL_op->op_private & OPpFT_STACKING ? (SV *)cGVOP_gv : (ret)); + else if (!(PL_op->op_private & OPpFT_STACKING)) + SETs(ret); + PUTBACK; + return NORMAL; +} #define FT_RETURNNO FT_RETURN_FALSE(&PL_sv_no) #define FT_RETURNUNDEF FT_RETURN_FALSE(&PL_sv_undef) -- 2.7.4