diff options
author | Richard Leach <richardleach@users.noreply.github.com> | 2022-09-02 22:58:07 +0000 |
---|---|---|
committer | Richard Leach <richardleach@users.noreply.github.com> | 2022-10-22 15:31:02 +0100 |
commit | 382a56637961ef97fde5808e97df108db4e3ed8d (patch) | |
tree | cf61f690a4659d34ebaad4c9ab6ff4a588ff0c2e /hints | |
parent | 9e99fbb3940bfab6ce2638107363e928bcca917a (diff) | |
download | perl-382a56637961ef97fde5808e97df108db4e3ed8d.tar.gz |
sv.c - add BODYLESS_NV fast code to sv_setXv functions
For "BODYLESS" IVs and NVs, type up/downgrades can be easily done
without having to call sv_upgrade. (Which will also not convert a
BODYLESS NV back down to an IV, even when it is harmless to do so.)
This commit adds "BODYLESS" handling to sv_setiv and sv_setnv, which
previously lacked it, and "BODYLESS_NV" handling to sv_setsv_flags,
which previously only special-cased "BODYLESS_IV"s.
The BODYLESS_IV code in sv_setsv_flags previously did not preserve
flags such as SVs_TEMP or SVs_PADTMP, which seemed like a potential
latent bug. (The new BODYLESS_NV code *has* to preserve SVs_TEMP in
order for all tests in t/lib/warnings to continue to pass.) Rather
than clearing all flags, this commit instead does a SvOK_off(dsv)
for both BODYLESS_IV and BODYLESS_NV cases.
Diffstat (limited to 'hints')
0 files changed, 0 insertions, 0 deletions