diff options
author | unknown <bar@bar.mysql.r18.ru> | 2003-05-23 17:45:52 +0500 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2003-05-23 17:45:52 +0500 |
commit | 5aae66c1017aaef0efc0080c095436f954288bd6 (patch) | |
tree | 40660f305f13b43f69d092c4719cebfaaf120a40 /client/sql_string.cc | |
parent | f461dea4d7066c6dfe14b33cc549f7e0183f6b8e (diff) | |
download | mariadb-git-5aae66c1017aaef0efc0080c095436f954288bd6.tar.gz |
CHARSET_INFO structure reorganization for easier maintainance
Diffstat (limited to 'client/sql_string.cc')
-rw-r--r-- | client/sql_string.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/client/sql_string.cc b/client/sql_string.cc index 8ab205d9fb1..65a9ff68c53 100644 --- a/client/sql_string.cc +++ b/client/sql_string.cc @@ -97,13 +97,13 @@ bool String::set(longlong num, CHARSET_INFO *cs) if (alloc(l)) return TRUE; - if (cs->snprintf == my_snprintf_8bit) + if (cs->cset->snprintf == my_snprintf_8bit) { str_length=(uint32) (longlong10_to_str(num,Ptr,-10)-Ptr); } else { - str_length=cs->snprintf(cs,Ptr,l,"%d",num); + str_length=cs->cset->snprintf(cs,Ptr,l,"%d",num); } str_charset=cs; return FALSE; @@ -115,13 +115,13 @@ bool String::set(ulonglong num, CHARSET_INFO *cs) if (alloc(l)) return TRUE; - if (cs->snprintf == my_snprintf_8bit) + if (cs->cset->snprintf == my_snprintf_8bit) { str_length=(uint32) (longlong10_to_str(num,Ptr,10)-Ptr); } else { - str_length=cs->snprintf(cs,Ptr,l,"%d",num); + str_length=cs->cset->snprintf(cs,Ptr,l,"%d",num); } str_charset=cs; return FALSE; @@ -255,7 +255,7 @@ bool String::copy(const char *str,uint32 arg_length, CHARSET_INFO *from, CHARSET for (str_length=new_length ; s < se && d < de ; ) { - if ((cnvres=from->mb_wc(from,&wc,s,se)) > 0 ) + if ((cnvres=from->cset->mb_wc(from,&wc,s,se)) > 0 ) { s+=cnvres; } @@ -268,7 +268,7 @@ bool String::copy(const char *str,uint32 arg_length, CHARSET_INFO *from, CHARSET break; outp: - if((cnvres=to->wc_mb(to,wc,d,de)) >0 ) + if((cnvres=to->cset->wc_mb(to,wc,d,de)) >0 ) { d+=cnvres; } |