This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Refactoring to Sv*_set() macros - patch #5
[perl5.git] / pad.c
diff --git a/pad.c b/pad.c
index e73f750..9a63e3e 100644 (file)
--- a/pad.c
+++ b/pad.c
@@ -337,7 +337,7 @@ Perl_pad_add_name(pTHX_ const char *name, HV* typestash, HV* ourstash, bool fake
 
     if (typestash) {
        SvFLAGS(namesv) |= SVpad_TYPED;
-       SvSTASH(namesv) = (HV*)SvREFCNT_inc((SV*) typestash);
+       SvSTASH_set(namesv, (HV*)SvREFCNT_inc((SV*) typestash));
     }
     if (ourstash) {
        SvFLAGS(namesv) |= SVpad_OUR;