diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-03-26 18:59:03 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-03-26 18:59:03 +0000 |
commit | efcbbafbf10077e558f8e3e69fc9ffdd50d0924f (patch) | |
tree | d62a3e32f2a4bcec31da56e8c0b479d385462613 /sv.c | |
parent | ec08ff806cb70a184db7ff25b978632f878170bc (diff) | |
download | perl-efcbbafbf10077e558f8e3e69fc9ffdd50d0924f.tar.gz |
Don't call S_utf8_mg_pos_cache_update(), and hence don't even create
the magic for the UTF-8 cache, if the UTF-8 caching is disabled.
p4raw-id: //depot/perl@33579
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -5882,7 +5882,8 @@ S_sv_pos_u2b_cached(pTHX_ SV *const sv, MAGIC **const mgp, const U8 *const start boffset = real_boffset; } - S_utf8_mg_pos_cache_update(aTHX_ sv, mgp, boffset, uoffset, send - start); + if (PL_utf8cache) + utf8_mg_pos_cache_update(sv, mgp, boffset, uoffset, send - start); return boffset; } @@ -6237,7 +6238,8 @@ Perl_sv_pos_b2u(pTHX_ register SV *const sv, I32 *const offsetp) } *offsetp = len; - S_utf8_mg_pos_cache_update(aTHX_ sv, &mg, byte, len, blen); + if (PL_utf8cache) + utf8_mg_pos_cache_update(sv, &mg, byte, len, blen); } /* |