~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/blob.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:
30
30
public:
31
31
  Field_blob(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg,
32
32
             enum utype unireg_check_arg, const char *field_name_arg,
33
 
             TABLE_SHARE *share, uint blob_pack_length, CHARSET_INFO *cs);
 
33
             TABLE_SHARE *share, uint blob_pack_length, const CHARSET_INFO * const cs);
34
34
  Field_blob(uint32_t len_arg,bool maybe_null_arg, const char *field_name_arg,
35
 
             CHARSET_INFO *cs)
 
35
             const CHARSET_INFO * const cs)
36
36
    :Field_longstr((uchar*) 0, len_arg, maybe_null_arg ? (uchar*) "": 0, 0,
37
37
                   NONE, field_name_arg, cs),
38
38
    packlength(4)
40
40
    flags|= BLOB_FLAG;
41
41
  }
42
42
  Field_blob(uint32_t len_arg,bool maybe_null_arg, const char *field_name_arg,
43
 
             CHARSET_INFO *cs, bool set_packlength)
 
43
             const CHARSET_INFO * const cs, bool set_packlength)
44
44
    :Field_longstr((uchar*) 0,len_arg, maybe_null_arg ? (uchar*) "": 0, 0,
45
45
                   NONE, field_name_arg, cs)
46
46
  {
60
60
  enum_field_types type() const { return DRIZZLE_TYPE_BLOB;}
61
61
  enum ha_base_keytype key_type() const
62
62
    { return binary() ? HA_KEYTYPE_VARBINARY2 : HA_KEYTYPE_VARTEXT2; }
63
 
  int  store(const char *to,uint length,CHARSET_INFO *charset);
 
63
  int  store(const char *to,uint length, const CHARSET_INFO * const charset);
64
64
  int  store(double nr);
65
65
  int  store(int64_t nr, bool unsigned_val);
66
66
  double val_real(void);