In pp_qr, use gv_stashsv() directly on the SV.
authorNicholas Clark <nick@ccl4.org>
Sat, 17 Jul 2010 12:00:46 +0000 (13:00 +0100)
committerNicholas Clark <nick@ccl4.org>
Sat, 17 Jul 2010 12:00:46 +0000 (13:00 +0100)
Brought to you by the campaign for the elimination of strlen().

pp_hot.c

index 217ee26..d5a4572 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1218,7 +1218,7 @@ PP(pp_qr)
     SvROK_on(rv);
 
     if (pkg) {
-       HV* const stash = gv_stashpv(SvPV_nolen(pkg), GV_ADD);
+       HV *const stash = gv_stashsv(pkg, GV_ADD);
        SvREFCNT_dec(pkg);
        (void)sv_bless(rv, stash);
     }