This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
expand and rename S_undo_inc_then_croak()
authorDavid Mitchell <davem@iabyn.com>
Tue, 28 Jun 2016 20:22:39 +0000 (21:22 +0100)
committerDavid Mitchell <davem@iabyn.com>
Fri, 1 Jul 2016 08:35:14 +0000 (09:35 +0100)
commit06a7bc17ca999c04cd2c36ca6162417b9bc32959
tree5939b66a4878edb7708c3401b5fb02440f9890bc
parent7d140242f905c25687570b43289e06f0643d55f3
expand and rename S_undo_inc_then_croak()

This function is called from 3 places in pp_ctl.c to do things on require
failure like:

    delete $INC{$name};
    croak "$errsv: Compilation failed in require"

After some previous commits, all 3 callers are now very similar around the
time they call this function: for example they all do

    CX_LEAVE_SCOPE(cx);
    cx_popeval(cx);
    cx_popblock(cx);

So incorporate all that into the function too, and rename it to
S_pop_eval_context_maybe_croak() to reflect its expanded role.
pp_ctl.c