~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/ctype-uca.cc

  • Committer: Olaf van der Spek
  • Date: 2011-06-29 18:32:25 UTC
  • mto: This revision was merged to the branch mainline in revision 2362.
  • Revision ID: olafvdspek@gmail.com-20110629183225-bxa0qk9wqg0w4rng
Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
 
42
42
using namespace std;
43
43
 
44
 
namespace drizzled
45
 
{
 
44
namespace drizzled {
46
45
 
47
46
#define MY_UCA_CMASK  255
48
47
#define MY_UCA_PSHIFT 8
7814
7813
    */
7815
7814
    uint32_t size= 0x40*0x40*sizeof(uint16_t) + 256;
7816
7815
    char *contraction_flags;
7817
 
    if (!(cs->contractions= (uint16_t*) (*alloc)(size)))
7818
 
        return 1;
 
7816
    cs->contractions= (uint16_t*) (*alloc)(size);
7819
7817
    memset(cs->contractions, 0, size);
7820
7818
    contraction_flags= ((char*) cs->contractions) + 0x40*0x40;
7821
7819
    for (i=0; i < rc; i++)
7859
7857
  Should work for any character set.
7860
7858
*/
7861
7859
 
7862
 
bool my_coll_init_uca(charset_info_st *cs, cs_alloc_func alloc)
 
7860
static bool my_coll_init_uca(charset_info_st& cs, cs_alloc_func alloc)
7863
7861
{
7864
 
  cs->pad_char= ' ';
7865
 
  return create_tailoring(cs, alloc);
 
7862
  cs.pad_char= ' ';
 
7863
  return create_tailoring(&cs, alloc);
7866
7864
}
7867
7865
 
7868
7866
int my_strnncoll_any_uca(const charset_info_st * const cs,