~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/memory/root.cc

  • Committer: Olaf van der Spek
  • Date: 2011-06-22 14:19:44 UTC
  • mto: This revision was merged to the branch mainline in revision 2347.
  • Revision ID: olafvdspek@gmail.com-20110622141944-na0vb0uv30n6u55z
Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
225
225
  }
226
226
  va_end(args);
227
227
 
228
 
  if (!(start= (char*) this->alloc_root(tot_length)))
229
 
    return(0);
 
228
  start= (char*) this->alloc_root(tot_length);
230
229
 
231
230
  va_start(args, unused);
232
231
  res= start;
344
343
 */
345
344
char* Root::strmake(const char* str, size_t len)
346
345
{
347
 
  char* pos= (char*)alloc_root(len + 1);
 
346
  char* pos= (char*)alloc(len + 1);
348
347
  memcpy(pos, str, len);
349
348
  pos[len]= 0;
350
349
  return pos;
371
370
 */
372
371
void* Root::memdup(const void* str, size_t len)
373
372
{
374
 
  void* pos= this->alloc_root(len);
 
373
  void* pos= alloc(len);
375
374
  memcpy(pos, str, len);
376
375
  return pos;
377
376
}