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.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.c')
-rw-r--r-- | pp.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |