~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/typelib.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:
120
120
 
121
121
TYPELIB *TYPELIB::copy_typelib(memory::Root& root) const
122
122
{
123
 
  TYPELIB* to= (TYPELIB*) root.alloc_root(sizeof(TYPELIB));
124
 
  to->type_names= (const char**)root.alloc_root((sizeof(char *) + sizeof(int)) * (count + 1));
 
123
  TYPELIB* to= (TYPELIB*) root.alloc(sizeof(TYPELIB));
 
124
  to->type_names= (const char**)root.alloc((sizeof(char *) + sizeof(int)) * (count + 1));
125
125
  to->type_lengths= (unsigned int*)(to->type_names + count + 1);
126
126
  to->count= count;
127
127
  to->name= name ? root.strdup(name) : NULL;