summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-03-26 18:59:03 +0000
committerNicholas Clark <nick@ccl4.org>2008-03-26 18:59:03 +0000
commitefcbbafbf10077e558f8e3e69fc9ffdd50d0924f (patch)
treed62a3e32f2a4bcec31da56e8c0b479d385462613 /sv.c
parentec08ff806cb70a184db7ff25b978632f878170bc (diff)
downloadperl-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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sv.c b/sv.c
index ce6c3f7595..e800bd75f6 100644
--- a/sv.c
+++ b/sv.c
@@ -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);
}
/*