diff options
author | Nicholas Clark <nick@ccl4.org> | 2004-06-15 07:17:17 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2004-06-15 07:17:17 +0000 |
commit | 2649f2c19a9dc4cac2cf535de25fe7b36dee8328 (patch) | |
tree | c20e9da3d3e4d83827df2dfbee77900644959364 /ext | |
parent | ffb05e06c71730527accd4c1399a30e98fb7f6d5 (diff) | |
download | perl-2649f2c19a9dc4cac2cf535de25fe7b36dee8328.tar.gz |
Assert SvTYPE is at least PGMV whenever accessing SvSTASH
p4raw-id: //depot/perl@22935
Diffstat (limited to 'ext')
-rw-r--r-- | ext/Storable/Storable.xs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/Storable/Storable.xs b/ext/Storable/Storable.xs index 2efc07ce9f..a8cd003342 100644 --- a/ext/Storable/Storable.xs +++ b/ext/Storable/Storable.xs @@ -4287,9 +4287,8 @@ static SV *retrieve_ref(pTHX_ stcxt_t *cxt, char *cname) */ if (cname) { - /* Do not use sv_upgrade to preserve STASH */ - SvFLAGS(rv) &= ~SVTYPEMASK; - SvFLAGS(rv) |= SVt_RV; + /* No need to do anything, as rv will already be PVMG. */ + assert (SvTYPE(rv) >= SVt_RV); } else { sv_upgrade(rv, SVt_RV); } |