This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate the API from:
[perl5.git] / perl.c
diff --git a/perl.c b/perl.c
index b0271d1..05575b7 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -3148,7 +3148,7 @@ S_init_main_stash(pTHX)
     SvREFCNT_dec(GvHV(gv));
     GvHV(gv) = (HV*)SvREFCNT_inc(PL_defstash);
     SvREADONLY_on(gv);
-    HvNAME(PL_defstash) = savepv("main");
+    hv_name_set(PL_defstash, "main", 4, 0);
     PL_incgv = gv_HVadd(gv_AVadd(gv_fetchpv("INC",TRUE, SVt_PVAV)));
     GvMULTI_on(PL_incgv);
     PL_hintgv = gv_fetchpv("\010",TRUE, SVt_PV); /* ^H */