summaryrefslogtreecommitdiff
path: root/pp.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.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.c')
-rw-r--r--pp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pp.c b/pp.c
index 349e91f03c..08ebe5e784 100644
--- a/pp.c
+++ b/pp.c
@@ -172,8 +172,8 @@ PP(pp_rv2gv)
const char * const name = CopSTASHPV(PL_curcop);
gv = newGVgen(name);
}
- 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 (SvPVX_const(sv)) {
SvPV_free(sv);
SvLEN_set(sv, 0);
@@ -536,7 +536,7 @@ S_refto(pTHX_ SV *sv)
SvREFCNT_inc_void_NN(sv);
}
rv = sv_newmortal();
- sv_upgrade(rv, SVt_RV);
+ sv_upgrade(rv, SVt_IV);
SvRV_set(rv, sv);
SvROK_on(rv);
return rv;