~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/my_hash.cc

  • Committer: Olaf van der Spek
  • Date: 2011-08-13 14:36:27 UTC
  • mto: This revision was merged to the branch mainline in revision 2407.
  • Revision ID: olafvdspek@gmail.com-20110813143627-j92kghasif1w2xe4
Refactor DYNAMIC_ARRAY

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
           hash_free_key free_element, uint32_t flags)
56
56
{
57
57
  hash->records=0;
58
 
  my_init_dynamic_array_ci(&hash->array, sizeof(HASH_LINK), size, growth_size);
 
58
  hash->array.init(sizeof(HASH_LINK), size, growth_size);
59
59
  hash->key_offset=key_offset;
60
60
  hash->key_length=key_length;
61
61
  hash->blength=1;
104
104
{
105
105
  hash_free_elements(hash);
106
106
  hash->free= 0;
107
 
  delete_dynamic(&hash->array);
 
107
  hash->array.free();
108
108
}
109
109
 
110
110
/* some helper functions */
266
266
  }
267
267
 
268
268
  flag=0;
269
 
  if (!(empty=(HASH_LINK*) alloc_dynamic(&info->array)))
270
 
    /* No more memory */
271
 
    return true;
 
269
  empty=(HASH_LINK*)info->array.alloc();
272
270
 
273
271
  data=dynamic_element(&info->array,0,HASH_LINK*);
274
272
  halfbuff= info->blength >> 1;