summaryrefslogtreecommitdiff
path: root/XSUB.h
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-12-13 16:33:46 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-12-13 16:33:46 +0000
commita02b22391697d92e42a9d962357c883f5be7c0ef (patch)
tree060a7212a2b821185ccbe5e89b35e7d7f9b487a4 /XSUB.h
parentf262848d51493a3e2e294087f9971a5544bee221 (diff)
downloadperl-a02b22391697d92e42a9d962357c883f5be7c0ef.tar.gz
Make the XSRETURN macro evaluate its argument only once.
p4raw-id: //depot/perl@21891
Diffstat (limited to 'XSUB.h')
-rw-r--r--XSUB.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/XSUB.h b/XSUB.h
index ce76a7b132..4a1079f9ba 100644
--- a/XSUB.h
+++ b/XSUB.h
@@ -193,7 +193,8 @@ C<xsubpp>. See L<perlxs/"The VERSIONCHECK: Keyword">.
#define XSRETURN(off) \
STMT_START { \
- PL_stack_sp = PL_stack_base + ax + ((off) - 1); \
+ IV tmpXSoff = (off); \
+ PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); \
return; \
} STMT_END