~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_string.h

  • Committer: Mark Atwood
  • Date: 2011-05-09 02:54:53 UTC
  • mfrom: (2281.6.4 prune3)
  • Revision ID: me@mark.atwood.name-20110509025453-xpdwk8ary7p63m8x
mergeĀ lp:~olafvdspek/drizzle/prune3

Show diffs side-by-side

added added

removed removed

Lines of Context:
202
202
      real_alloc(arg_length);
203
203
  }
204
204
  void real_alloc(size_t arg_length);                   // Empties old string
205
 
  bool realloc(size_t arg_length);
 
205
  void realloc(size_t arg_length);
206
206
  inline void shrink(size_t arg_length)         // Shrink buffer
207
207
  {
208
208
    if (arg_length < Alloced_length)
220
220
      }
221
221
    }
222
222
  }
223
 
  bool is_alloced() { return alloced; }
 
223
  bool is_alloced() { return alloced; } const
224
224
  inline String& operator = (const String &s)
225
225
  {
226
226
    if (&s != this)
275
275
  size_t numchars();
276
276
  int charpos(int i,size_t offset=0);
277
277
 
278
 
  int reserve(size_t space_needed)
 
278
  void reserve(size_t space_needed)
279
279
  {
280
 
    return realloc(str_length + space_needed);
 
280
    realloc(str_length + space_needed);
281
281
  }
282
 
  int reserve(size_t space_needed, size_t grow_by);
 
282
  void reserve(size_t space_needed, size_t grow_by);
283
283
 
284
284
  /*
285
285
    The following append operations do NOT check alloced memory
299
299
  {
300
300
    size_t new_length= arg_length + str_length;
301
301
    if (new_length > Alloced_length)
302
 
    {
303
 
      if (realloc(new_length + step_alloc))
304
 
        return 0;
305
 
    }
 
302
      realloc(new_length + step_alloc);
306
303
    size_t old_length= str_length;
307
304
    str_length+= arg_length;
308
305
    return Ptr+ old_length;                     /* Area to use */