summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-05-21 15:59:37 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-05-21 16:07:27 -0700
commit8d7906e182f93e1854b5c77a2ec7dec90b79a3f3 (patch)
tree32e230aff5236daeaa60370c60e59ec2ef555971
parentfe75fd00d2076d7b4f1d3702b67d22e96633c3b3 (diff)
downloadperl-8d7906e182f93e1854b5c77a2ec7dec90b79a3f3.tar.gz
Fix non-GCC compilation
I mistakenly thought XPUSHs(...) was an expression. Now it is.
-rw-r--r--pp.h7
-rw-r--r--pp_sys.c4
2 files changed, 5 insertions, 6 deletions
diff --git a/pp.h b/pp.h
index 22621c14c9..539dd130b2 100644
--- a/pp.h
+++ b/pp.h
@@ -277,9 +277,8 @@ Does not use C<TARG>. See also C<XPUSHu>, C<mPUSHu> and C<PUSHu>.
=cut
*/
-#define EXTEND(p,n) STMT_START { if (PL_stack_max - p < (int)(n)) { \
- sp = stack_grow(sp,p, (int) (n)); \
- } } STMT_END
+#define EXTEND(p,n) (void)(PL_stack_max - p < (int)(n) && \
+ (sp = stack_grow(sp,p, (int) (n))))
/* Same thing, but update mark register too. */
#define MEXTEND(p,n) STMT_START {if (PL_stack_max - p < (int)(n)) { \
@@ -295,7 +294,7 @@ Does not use C<TARG>. See also C<XPUSHu>, C<mPUSHu> and C<PUSHu>.
#define PUSHi(i) STMT_START { sv_setiv(TARG, (IV)(i)); PUSHTARG; } STMT_END
#define PUSHu(u) STMT_START { sv_setuv(TARG, (UV)(u)); PUSHTARG; } STMT_END
-#define XPUSHs(s) STMT_START { EXTEND(sp,1); (*++sp = (s)); } STMT_END
+#define XPUSHs(s) (EXTEND(sp,1), *++sp = (s))
#define XPUSHTARG STMT_START { SvSETMAGIC(TARG); XPUSHs(TARG); } STMT_END
#define XPUSHp(p,l) STMT_START { sv_setpvn(TARG, (p), (l)); XPUSHTARG; } STMT_END
#define XPUSHn(n) STMT_START { sv_setnv(TARG, (NV)(n)); XPUSHTARG; } STMT_END
diff --git a/pp_sys.c b/pp_sys.c
index 787b8170a2..02b50eacf3 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -2924,10 +2924,10 @@ S_ft_stacking_return_false(pTHX_ SV *ret) {
#define FT_RETURN_TRUE(X) \
RETURNX((void)( \
PL_op->op_flags & OPf_REF \
- ? XPUSHs( \
+ ? (bool)XPUSHs( \
PL_op->op_private & OPpFT_STACKING ? (SV *)cGVOP_gv : (X) \
) \
- : (void)(PL_op->op_private & OPpFT_STACKING || SETs(X)) \
+ : (PL_op->op_private & OPpFT_STACKING || SETs(X)) \
))
#define FT_RETURNNO FT_RETURN_FALSE(&PL_sv_no)