#include "toke_on_crack.c.inc"
-static void free_ptr_op(void *vp) {
+static void free_ptr_op(pTHX_ void *vp) {
OP **pp = vp;
op_free(*pp);
Safefree(pp);
}
-#define sv_eq_pvs(SV, S) sv_eq_pvn(SV, "" S "", sizeof (S) - 1)
+#define sv_eq_pvs(SV, S) sv_eq_pvn(aTHX_ SV, "" S "", sizeof (S) - 1)
-static int sv_eq_pvn(SV *sv, const char *p, STRLEN n) {
+static int sv_eq_pvn(pTHX_ SV *sv, const char *p, STRLEN n) {
STRLEN sv_len;
const char *sv_p = SvPV(sv, sv_len);
return
if (!S_scan_str(aTHX_ proto, FALSE, FALSE)) {
croak("In %"SVf": prototype not terminated", SVfARG(declarator));
}
- S_check_prototype(declarator, proto);
+ S_check_prototype(aTHX_ declarator, proto);
lex_read_space(0);
c = lex_peek_unichar(0);
}
/* attributes */
Newx(attrs_sentinel, 1, OP *);
*attrs_sentinel = NULL;
- SAVEDESTRUCTOR(free_ptr_op, attrs_sentinel);
+ SAVEDESTRUCTOR_X(free_ptr_op, attrs_sentinel);
if (c == ':' || c == '{') {
/* munge */
{
/* create outer block: '{' */
- const int save_ix = S_block_start(TRUE);
+ const int save_ix = S_block_start(aTHX_ TRUE);
OP *init = NULL;
/* my $self = shift; */
body = op_append_list(OP_LINESEQ, init, body);
/* close outer block: '}' */
- S_block_end(save_ix, body);
+ S_block_end(aTHX_ save_ix, body);
}
/* it's go time. */
dVAR;
const int retval = PL_savestack_ix;
- S_pad_block_start(full);
+ S_pad_block_start(aTHX_ full);
SAVEHINTS();
PL_hints &= ~HINT_BLOCK_SCOPE;
SAVECOMPILEWARNINGS();
switch (o->op_type) {
case OP_REPEAT:
- S_scalar(cBINOPo->op_first);
+ S_scalar(aTHX_ cBINOPo->op_first);
break;
case OP_OR:
case OP_AND:
case OP_COND_EXPR:
for (kid = cUNOPo->op_first->op_sibling; kid; kid = kid->op_sibling)
- S_scalar(kid);
+ S_scalar(aTHX_ kid);
break;
/* FALL THROUGH */
case OP_SPLIT:
default:
if (o->op_flags & OPf_KIDS) {
for (kid = cUNOPo->op_first; kid; kid = kid->op_sibling)
- S_scalar(kid);
+ S_scalar(aTHX_ kid);
}
break;
case OP_LEAVE:
case OP_LEAVETRY:
kid = cLISTOPo->op_first;
- S_scalar(kid);
+ S_scalar(aTHX_ kid);
kid = kid->op_sibling;
do_kids:
while (kid) {
OP *sib = kid->op_sibling;
if (sib && kid->op_type != OP_LEAVEWHEN)
- S_scalarvoid(kid);
+ S_scalarvoid(aTHX_ kid);
else
- S_scalar(kid);
+ S_scalar(aTHX_ kid);
kid = sib;
}
PL_curcop = &PL_compiling;
if (o && o->op_flags & OPf_KIDS) {
OP *kid;
for (kid = cLISTOPo->op_first; kid; kid = kid->op_sibling)
- S_scalar(kid);
+ S_scalar(aTHX_ kid);
}
return o;
}
(PL_opargs[o->op_type] & OA_TARGLEX)
/* OPp share the meaning */
) {
- return S_scalar(o); /* As if inside SASSIGN */
+ return S_scalar(aTHX_ o); /* As if inside SASSIGN */
}
o->op_flags = (o->op_flags & ~OPf_WANT) | OPf_WANT_VOID;
}
case OP_AASSIGN: {
- S_inplace_aassign(o);
+ S_inplace_aassign(aTHX_ o);
break;
}
case OP_ENTERGIVEN:
case OP_ENTERWHEN:
for (kid = cUNOPo->op_first->op_sibling; kid; kid = kid->op_sibling)
- S_scalarvoid(kid);
+ S_scalarvoid(aTHX_ kid);
break;
case OP_NULL:
case OP_LEAVEGIVEN:
case OP_LEAVEWHEN:
for (kid = cLISTOPo->op_first; kid; kid = kid->op_sibling)
- S_scalarvoid(kid);
+ S_scalarvoid(aTHX_ kid);
break;
case OP_ENTEREVAL:
- S_scalarkids(o);
+ S_scalarkids(aTHX_ o);
break;
case OP_SCALAR:
- return S_scalar(o);
+ return S_scalar(aTHX_ o);
}
if (useless)
Perl_ck_warner(aTHX_ packWARN(WARN_VOID), "Useless use of %"SVf" in void context",
OP *kid;
for (kid = cLISTOPo->op_first; kid; kid = kid->op_sibling) {
if (kid->op_sibling) {
- S_scalarvoid(kid);
+ S_scalarvoid(aTHX_ kid);
}
}
PL_curcop = &PL_compiling;
static OP *S_block_end(pTHX_ I32 floor, OP *seq) {
dVAR;
const int needblockscope = PL_hints & HINT_BLOCK_SCOPE;
- OP *retval = S_scalarseq(seq);
+ OP *retval = S_scalarseq(aTHX_ seq);
CALL_BLOCK_HOOKS(bhk_pre_end, &retval);
CopHINTS_set(&PL_compiling, PL_hints);
if (needblockscope)
PL_hints |= HINT_BLOCK_SCOPE; /* propagate out */
- S_pad_leavemy();
+ S_pad_leavemy(aTHX);
CALL_BLOCK_HOOKS(bhk_post_end, &retval);