diff options
author | Nicholas Clark <nick@ccl4.org> | 2012-07-27 15:05:00 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2012-07-28 09:56:58 +0200 |
commit | 48d023d6dd4655c978fe712c6c3c23f1415bcf04 (patch) | |
tree | 6a75bfd2e5c4a7b08493ce26ba7bed16270f5674 /pp_sys.c | |
parent | 07ed4d4bd6e7cc6958b6ea257f2e7cfa1469e279 (diff) | |
download | perl-48d023d6dd4655c978fe712c6c3c23f1415bcf04.tar.gz |
Eliminate the macros FT_RETURN_FALSE() and FT_RETURN_TRUE().
As they now simply return the results of S_ft_return_false() and
S_ft_return_true() respectively, use this explicitly in the 7 places where
the macros had been used.
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 19 |
1 files changed, 7 insertions, 12 deletions
@@ -2925,11 +2925,6 @@ S_ft_return_false(pTHX_ SV *ret) { return next; } -#define FT_RETURN_FALSE(X) \ - return S_ft_return_false(aTHX_ X) -#define FT_RETURN_TRUE(X) \ - return S_ft_return_true(aTHX_ X) - PERL_STATIC_INLINE OP * S_ft_return_true(pTHX_ SV *ret) { dSP; @@ -2941,9 +2936,9 @@ S_ft_return_true(pTHX_ SV *ret) { return NORMAL; } -#define FT_RETURNNO FT_RETURN_FALSE(&PL_sv_no) -#define FT_RETURNUNDEF FT_RETURN_FALSE(&PL_sv_undef) -#define FT_RETURNYES FT_RETURN_TRUE(&PL_sv_yes) +#define FT_RETURNNO return S_ft_return_false(aTHX_ &PL_sv_no) +#define FT_RETURNUNDEF return S_ft_return_false(aTHX_ &PL_sv_undef) +#define FT_RETURNYES return S_ft_return_true(aTHX_ &PL_sv_yes) #define tryAMAGICftest_MG(chr) STMT_START { \ if ( (SvFLAGS(*PL_stack_sp) & (SVf_ROK|SVs_GMG)) \ @@ -2971,8 +2966,8 @@ S_try_amagic_ftest(pTHX_ char chr) { if (!tmpsv) return NULL; - if (SvTRUE(tmpsv)) FT_RETURN_TRUE(tmpsv); - FT_RETURN_FALSE(tmpsv); + return SvTRUE(tmpsv) + ? S_ft_return_true(aTHX_ tmpsv) : S_ft_return_false(aTHX_ tmpsv); } return NULL; } @@ -3143,8 +3138,8 @@ PP(pp_ftis) break; } SvSETMAGIC(TARG); - if (SvTRUE_nomg(TARG)) FT_RETURN_TRUE(TARG); - else FT_RETURN_FALSE(TARG); + return SvTRUE_nomg(TARG) + ? S_ft_return_true(aTHX_ TARG) : S_ft_return_false(aTHX_ TARG); } } |