Faster utf8_length method -- fixes [RT#50250]
authorAlex Vandiver <alex@chmrr.net>
Sat, 30 May 2009 16:38:28 +0000 (12:38 -0400)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Sat, 6 Jun 2009 07:13:21 +0000 (09:13 +0200)
commit8e91ec7fd4ffa8cda89687c8214203a3b3e8a0c8
treee1c27005a0b29bf12bd3aa78da4920736e1d3572
parentf699e9507ccd6209d4f240b42b00f92c8cf2f2b0
Faster utf8_length method -- fixes [RT#50250]

UTF8SKIP appears to be a rather slow call; use UTF8_IS_INVARIANT to
skip it whenever possible.  We also move the malformed utf8 check
until after the loop, since it can be checked after the termination
condition, instead of at every pass through the loop.
utf8.c