diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-12-28 13:46:26 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-12-28 13:46:26 -0800 |
commit | 69f00f6753978805180a07b2b8436ebad5ebb6c8 (patch) | |
tree | 30d3568bff60d9814dd7ca598b0c44d8a3e69a9c /pp.c | |
parent | 7e9044f980cffa21f055543f2d0818c838d0f632 (diff) | |
download | perl-69f00f6753978805180a07b2b8436ebad5ebb6c8.tar.gz |
pp.c:pp_rv2sv: Use >= instead of switch
This results in smaller machine code.
If a freed SV is exposed to perl space then ${\$freed} will now die,
which is arguably more correct.
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -372,15 +372,8 @@ PP(pp_rv2sv) } sv = SvRV(sv); - switch (SvTYPE(sv)) { - case SVt_PVAV: - case SVt_PVHV: - case SVt_PVCV: - case SVt_PVFM: - case SVt_PVIO: + if (SvTYPE(sv) >= SVt_PVAV) DIE(aTHX_ "Not a SCALAR reference"); - default: NOOP; - } } else { gv = MUTABLE_GV(sv); |