summaryrefslogtreecommitdiff
path: root/strings/ctype-big5.c
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2016-03-16 10:55:12 +0400
committerAlexander Barkov <bar@mariadb.org>2016-03-16 10:55:12 +0400
commite09299511e83f11f7476f7ea6c81ee12b00d7050 (patch)
treea3544293e29a5d191f2b07ce1810f58e257b1b10 /strings/ctype-big5.c
parentdc08ccab422098d2466fa342d577f03c941a4ffc (diff)
downloadmariadb-git-e09299511e83f11f7476f7ea6c81ee12b00d7050.tar.gz
MDEV-9665 Remove cs->cset->ismbchar()
Using a more powerfull cs->cset->charlen() instead.
Diffstat (limited to 'strings/ctype-big5.c')
-rw-r--r--strings/ctype-big5.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c
index d6a9695afbf..3351fb6ef2f 100644
--- a/strings/ctype-big5.c
+++ b/strings/ctype-big5.c
@@ -862,12 +862,12 @@ my_strnxfrm_big5(CHARSET_INFO *cs,
for (; dst < de && src < se && nweights; nweights--)
{
- if (cs->cset->ismbchar(cs, (const char*) src, (const char*) se))
+ if (my_charlen(cs, src, se) > 1)
{
/*
Note, it is safe not to check (src < se)
- in the code below, because ismbchar() would
- not return TRUE if src was too short
+ in the code below, because my_charlen() would
+ not return 2 if src was too short
*/
uint16 e= big5strokexfrm((uint16) big5code(*src, *(src + 1)));
*dst++= big5head(e);
@@ -930,13 +930,6 @@ static int my_strxfrm_big5(uchar *dest, const uchar *src, int len)
#endif
-static uint ismbchar_big5(CHARSET_INFO *cs __attribute__((unused)),
- const char* p, const char *e)
-{
- return (isbig5head(*(p)) && (e)-(p)>1 && isbig5tail(*((p)+1))? 2: 0);
-}
-
-
static uint mbcharlen_big5(CHARSET_INFO *cs __attribute__((unused)), uint c)
{
return (isbig5head(c)? 2 : 1);
@@ -6818,7 +6811,6 @@ static MY_COLLATION_HANDLER my_collation_handler_big5_bin=
static MY_CHARSET_HANDLER my_charset_big5_handler=
{
NULL, /* init */
- ismbchar_big5,
mbcharlen_big5,
my_numchars_mb,
my_charpos_mb,