summaryrefslogtreecommitdiff
path: root/pp.h
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 /pp.h
parentfe75fd00d2076d7b4f1d3702b67d22e96633c3b3 (diff)
downloadperl-8d7906e182f93e1854b5c77a2ec7dec90b79a3f3.tar.gz
Fix non-GCC compilation
I mistakenly thought XPUSHs(...) was an expression. Now it is.
Diffstat (limited to 'pp.h')
-rw-r--r--pp.h7
1 files changed, 3 insertions, 4 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