~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/hash.h

  • 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:
41
41
  DYNAMIC_ARRAY array;                          /* Place for hash_keys */
42
42
  hash_get_key get_key;
43
43
  void (*free)(void *);
44
 
  CHARSET_INFO *charset;
 
44
  const CHARSET_INFO *charset;
45
45
} HASH;
46
46
 
47
47
/* A search iterator state */
49
49
 
50
50
#define hash_init(A,B,C,D,E,F,G,H) _hash_init(A,0,B,C,D,E,F,G,H CALLER_INFO)
51
51
#define hash_init2(A,B,C,D,E,F,G,H,I) _hash_init(A,B,C,D,E,F,G,H,I CALLER_INFO)
52
 
bool _hash_init(HASH *hash, uint growth_size,CHARSET_INFO *charset,
 
52
bool _hash_init(HASH *hash, uint growth_size, const CHARSET_INFO * const charset,
53
53
                   ulong default_array_elements, size_t key_offset,
54
54
                   size_t key_length, hash_get_key get_key,
55
55
                   void (*free_element)(void*), uint flags CALLER_INFO_PROTO);