~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/tree.cc

  • Committer: Jay Pipes
  • Date: 2009-02-04 15:44:25 UTC
  • mfrom: (829 drizzle)
  • mto: This revision was merged to the branch mainline in revision 830.
  • Revision ID: jpipes@serialcoder-20090204154425-th8xfk2ujz2y8xwg
Merge with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
  memset(&tree->null_element, 0, sizeof(tree->null_element));
85
85
  tree->root= &tree->null_element;
86
86
  tree->compare=compare;
87
 
  tree->size_of_element=size > 0 ? (uint32_t) size : 0;
 
87
  tree->size_of_element=size > 0 ? (uint) size : 0;
88
88
  tree->memory_limit=memory_limit;
89
89
  tree->free=free_element;
90
90
  tree->allocated=0;
94
94
  tree->null_element.left=tree->null_element.right=0;
95
95
  tree->flag= 0;
96
96
  if (!free_element && size >= 0 &&
97
 
      ((uint32_t) size <= sizeof(void*) || ((uint32_t) size & (sizeof(void*)-1))))
 
97
      ((uint) size <= sizeof(void*) || ((uint) size & (sizeof(void*)-1))))
98
98
  {
99
99
    /*
100
100
      We know that the data doesn't have to be aligned (like if the key
115
115
  }
116
116
  if (!(tree->with_delete=with_delete))
117
117
  {
118
 
    init_alloc_root(&tree->mem_root, (uint32_t) default_alloc_size, 0);
 
118
    init_alloc_root(&tree->mem_root, (uint) default_alloc_size, 0);
119
119
    tree->mem_root.min_malloc=(sizeof(TREE_ELEMENT)+tree->size_of_element);
120
120
  }
121
121
  return;