summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-12-26 17:03:56 +0000
committerNicholas Clark <nick@ccl4.org>2007-12-26 17:03:56 +0000
commit4df7f6afd80e96d28fd18bba9dda8b38b6ed6700 (patch)
tree4a12163f0a4326186eaaa2db0ba65cb330932dc6 /pp_hot.c
parent0707d6cc81b12c5d582707b1575b1be4695dd7fc (diff)
downloadperl-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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pp_hot.c b/pp_hot.c
index ca34f91890..276010c4db 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -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);