~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/client.c

  • Committer: Andrey Hristov
  • Date: 2008-08-06 00:04:45 UTC
  • mto: (264.1.5 codestyle)
  • mto: This revision was merged to the branch mainline in revision 266.
  • Revision ID: ahristov@mysql.com-20080806000445-84urmltikgwk9v5d
Constify the usage of CHARSET_INFO almost to the last place in the code.
99% of the parameters are const CHARSET_INFO * const cs.
Wherever possible stack variables are also double consted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1217
1217
                                         MY_CS_PRIMARY, MYF(MY_WME));
1218
1218
    if (drizzle->charset && default_collation_name)
1219
1219
    {
1220
 
      CHARSET_INFO *collation;
 
1220
      const CHARSET_INFO *collation;
1221
1221
      if ((collation=
1222
1222
           get_charset_by_name(default_collation_name, MYF(MY_WME))))
1223
1223
      {
2161
2161
*/
2162
2162
int STDCALL drizzle_set_character_set(DRIZZLE *drizzle, const char *cs_name)
2163
2163
{
2164
 
  struct charset_info_st *cs;
 
2164
  const CHARSET_INFO *cs;
2165
2165
  const char *save_csdir= charsets_dir;
2166
2166
 
2167
2167
  if (drizzle->options.charset_dir)
2168
2168
    charsets_dir= drizzle->options.charset_dir;
2169
2169
 
2170
2170
  if (strlen(cs_name) < MY_CS_NAME_SIZE &&
2171
 
     (cs= get_charset_by_csname(cs_name, MY_CS_PRIMARY, MYF(0))))
 
2171
      (cs= get_charset_by_csname(cs_name, MY_CS_PRIMARY, MYF(0))))
2172
2172
  {
2173
2173
    char buff[MY_CS_NAME_SIZE + 10];
2174
2174
    charsets_dir= save_csdir;