Permalink
Browse files

sv.h: Use valid_utf8_length()

  • Loading branch information...
khwilliamson committed Dec 7, 2017
1 parent d60084c commit e41e0746a07b483628c302366de5afbc4a17d814
Showing with 3 additions and 3 deletions.
  1. +3 −3 sv.h
View
6 sv.h
@@ -1974,9 +1974,9 @@ Like C<sv_utf8_upgrade>, but doesn't do magic on C<sv>.
sv_catpvn_flags(dsv, sstr, slen, (is_utf8)?SV_CATUTF8:SV_CATBYTES)
#if defined(PERL_CORE) || defined(PERL_EXT)
# define sv_or_pv_len_utf8(sv, pv, bytelen) \
(SvGAMAGIC(sv) \
? utf8_length((U8 *)(pv), (U8 *)(pv)+(bytelen)) \
# define sv_or_pv_len_utf8(sv, pv, bytelen) \
(SvGAMAGIC(sv) \
? valid_utf8_length((U8 *)(pv), (U8 *)(pv)+(bytelen)) \
: sv_len_utf8(sv))
#endif

0 comments on commit e41e074

Please sign in to comment.