~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/blob.h

  • Committer: Brian Aker
  • Date: 2008-08-05 04:10:42 UTC
  • mfrom: (261.2.8 codestyle)
  • mto: This revision was merged to the branch mainline in revision 263.
  • Revision ID: brian@tangent.org-20080805041042-1l4893r3bwy2lxz2
Merge from Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
    return (uint32_t) (((uint64_t) 1 << (packlength*8)) -1);
97
97
  }
98
98
  int reset(void) { memset(ptr, 0, packlength+sizeof(uchar*)); return 0; }
99
 
  void reset_fields() { memset((uchar*) &value, 0, sizeof(value)); }
 
99
  void reset_fields() { memset(&value, 0, sizeof(value)); }
100
100
#ifndef WORDS_BIGENDIAN
101
101
  static
102
102
#endif
129
129
  void put_length(uchar *pos, uint32_t length);
130
130
  inline void get_ptr(uchar **str)
131
131
    {
132
 
      memcpy((uchar*) str,ptr+packlength,sizeof(uchar*));
 
132
      memcpy(str,ptr+packlength,sizeof(uchar*));
133
133
    }
134
134
  inline void get_ptr(uchar **str, uint row_offset)
135
135
    {
136
 
      memcpy((uchar*) str,ptr+packlength+row_offset,sizeof(char*));
 
136
      memcpy(str,ptr+packlength+row_offset,sizeof(char*));
137
137
    }
138
138
  inline void set_ptr(uchar *length, uchar *data)
139
139
    {
182
182
  uint packed_col_length(const uchar *col_ptr, uint length);
183
183
  uint max_packed_col_length(uint max_length);
184
184
  void free() { value.free(); }
185
 
  inline void clear_temporary() { memset((uchar*) &value, 0, sizeof(value)); }
 
185
  inline void clear_temporary() { memset(&value, 0, sizeof(value)); }
186
186
  friend int field_conv(Field *to,Field *from);
187
187
  uint size_of() const { return sizeof(*this); }
188
188
  bool has_charset(void) const