diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-12-26 17:03:56 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-12-26 17:03:56 +0000 |
commit | 4df7f6afd80e96d28fd18bba9dda8b38b6ed6700 (patch) | |
tree | 4a12163f0a4326186eaaa2db0ba65cb330932dc6 /pp_hot.c | |
parent | 0707d6cc81b12c5d582707b1575b1be4695dd7fc (diff) | |
download | perl-4df7f6afd80e96d28fd18bba9dda8b38b6ed6700.tar.gz |
Eliminate SVt_RV, and use SVt_IV to store plain references.
This frees up a scalar type for first class regular expressions.
p4raw-id: //depot/perl@32734
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -150,7 +150,7 @@ PP(pp_sassign) The gv becomes a(nother) reference to the constant. */ SV *const value = SvRV(cv); - SvUPGRADE((SV *)gv, SVt_RV); + SvUPGRADE((SV *)gv, SVt_IV); SvPCS_IMPORTED_on(gv); SvRV_set(gv, value); SvREFCNT_inc_simple_void(value); @@ -2940,8 +2940,8 @@ Perl_vivify_ref(pTHX_ SV *sv, U32 to_what) if (!SvOK(sv)) { if (SvREADONLY(sv)) Perl_croak(aTHX_ PL_no_modify); - if (SvTYPE(sv) < SVt_RV || SvTYPE(sv) == SVt_NV) - sv_upgrade(sv, SVt_RV); + if (SvTYPE(sv) < SVt_PV && SvTYPE(sv) != SVt_IV) + sv_upgrade(sv, SVt_IV); else if (SvTYPE(sv) >= SVt_PV) { SvPV_free(sv); SvLEN_set(sv, 0); |