~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_string.h

  • Committer: Monty Taylor
  • Date: 2009-05-22 17:07:52 UTC
  • mfrom: (1022.4.2 update-to-gcc-44)
  • mto: This revision was merged to the branch mainline in revision 1036.
  • Revision ID: mordred@inaugust.com-20090522170752-vvd40ft31uhmc58w
Merged GCC 4.4 support from lp:~mordred/drizzle/update-to-gcc-44

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
    str_charset=str.str_charset;
103
103
  }
104
104
  static void *operator new(size_t size, MEM_ROOT *mem_root)
105
 
  { return (void*) alloc_root(mem_root, (uint32_t) size); }
 
105
  { return (void*) alloc_root(mem_root, (uint32_t) size); } 
106
106
  static void operator delete(void *, size_t)
107
107
  { TRASH(ptr_arg, size); }
108
108
  static void operator delete(void *, MEM_ROOT *)
122
122
  inline const char *ptr() const { return Ptr; }
123
123
  inline char *c_ptr()
124
124
  {
125
 
    if (!Ptr || Ptr[str_length])                /* Should be safe */
 
125
    if (str_length == Alloced_length)
126
126
      (void) realloc(str_length);
 
127
    else
 
128
      Ptr[str_length]= 0;
 
129
    
127
130
    return Ptr;
128
131
  }
129
132
  inline char *c_ptr_quick()