Skip to content

Commit a29b2af

Browse files
committed
pp_goto: fix macro-in-macro compile error
Turns out MSVC 1.42 doesn't like FOO(bar, #ifdef X 1 #else 0 #endif ); where FOO is a macro.
1 parent 0494ede commit a29b2af

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

pp_ctl.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3291,18 +3291,19 @@ PP(pp_goto)
32913291
}
32923292
else sv = AvARRAY(arg)[index];
32933293

3294-
3294+
#ifdef PERL_RC_STACK
32953295
rpp_push_1(
32963296
sv
3297-
?
3298-
#ifdef PERL_RC_STACK
3299-
sv
3297+
? sv
33003298
: newSVavdefelem(arg, index, 1)
3299+
);
33013300
#else
3302-
(r ? SvREFCNT_inc_NN(sv_2mortal(sv)) : sv)
3301+
rpp_push_1(
3302+
sv
3303+
? (r ? SvREFCNT_inc_NN(sv_2mortal(sv)) : sv)
33033304
: sv_2mortal(newSVavdefelem(arg, index, 1))
3304-
#endif
33053305
);
3306+
#endif
33063307
}
33073308
}
33083309

0 commit comments

Comments
 (0)