Skip to content

Commit

Permalink
pp_goto: fix macro-in-macro compile error
Browse files Browse the repository at this point in the history
Turns out MSVC 1.42 doesn't like

        FOO(bar,
    #ifdef X
            1
    #else
            0
    #endif
        );

where FOO is a macro.
  • Loading branch information
iabyn committed Aug 16, 2023
1 parent a40b473 commit dbc9c91
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions pp_ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3292,18 +3292,19 @@ PP(pp_goto)
}
else sv = AvARRAY(arg)[index];


#ifdef PERL_RC_STACK
rpp_push_1(
sv
?
#ifdef PERL_RC_STACK
sv
? sv
: newSVavdefelem(arg, index, 1)
);
#else
(r ? SvREFCNT_inc_NN(sv_2mortal(sv)) : sv)
rpp_push_1(
sv
? (r ? SvREFCNT_inc_NN(sv_2mortal(sv)) : sv)
: sv_2mortal(newSVavdefelem(arg, index, 1))
#endif
);
#endif
}
}

Expand Down

0 comments on commit dbc9c91

Please sign in to comment.