This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
257e0650 used the "wrong" croak() - correct B::GV:SV to use Perl_croak().
authorNicholas Clark <nick@ccl4.org>
Sat, 30 Oct 2010 10:40:08 +0000 (11:40 +0100)
committerNicholas Clark <nick@ccl4.org>
Sat, 30 Oct 2010 10:40:08 +0000 (11:40 +0100)
Perl_croak() is a variable argument C function, hence can't have a macro to
permit the use of croak() with/without a context pointer. croak *is* defined
as a macro, substituting croak_nocontext. But we have a context to hand, so we
can use Perl_croak() directly.

ext/B/B.xs

index 3b8aabd..a05cbc6 100644 (file)
@@ -1725,7 +1725,7 @@ SV(gv)
        gp = GvGP(gv);
        if (!gp) {
            const GV *const gv = CvGV(cv);
-           croak(aTHX_ "NULL gp in B::GV::%s", gv ? GvNAME(gv) : "???");
+           Perl_croak(aTHX_ "NULL gp in B::GV::%s", gv ? GvNAME(gv) : "???");
        }
        ptr = (ix & 0xFFFF) + (char *)gp;
        switch ((U8)(ix >> 16)) {