From a1fc3589640dccc9c8753882dbb0c95d609b77e9 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 22 Jul 2013 21:41:08 -0400 Subject: fix compilation on threaded perls --- Keyword.xs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Keyword.xs b/Keyword.xs index dd92a6a..7f70222 100644 --- a/Keyword.xs +++ b/Keyword.xs @@ -7,6 +7,10 @@ #define cv_clone(a) Perl_cv_clone(aTHX_ a) #endif +#ifndef scalar +#define scalar(a) Perl_scalar(aTHX_ a) +#endif + #define REENTER_PARSER STMT_START { \ ENTER; \ PL_curcop = &PL_compiling; \ @@ -15,7 +19,7 @@ #define LEAVE_PARSER LEAVE -static SV *parser_fn(OP *(fn)(U32), bool named) +static SV *parser_fn(OP *(fn)(pTHX_ U32), bool named) { I32 floor; CV *code; @@ -23,7 +27,7 @@ static SV *parser_fn(OP *(fn)(U32), bool named) REENTER_PARSER; floor = start_subparse(0, named ? 0 : CVf_ANON); - code = newATTRSUB(floor, NULL, NULL, NULL, fn(0)); + code = newATTRSUB(floor, NULL, NULL, NULL, fn(aTHX_ 0)); LEAVE_PARSER; @@ -68,9 +72,7 @@ static OP *parser_callback(pTHX_ GV *namegv, SV *psobj, U32 *flagsp) } return newUNOP(OP_ENTERSUB, OPf_STACKED, - newCVREF(0, - Perl_scalar(newSVOP(OP_CONST, 0, - args_generator)))); + newCVREF(0, scalar(newSVOP(OP_CONST, 0, args_generator)))); } /* TODO: -- cgit v1.2.3-54-g00ecf