Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix avl element name

  • Loading branch information...
commit c6a4ea994c6c0cc510a7804d035de89d482508b7 1 parent 4e4b24f
Jeffrey Kegler authored
Showing with 8 additions and 6 deletions.
  1. +6 −4 r2/libmarpa/dev/avl/avl.c
  2. +2 −2 r2/libmarpa/dev/avl/avl.h
View
10 r2/libmarpa/dev/avl/avl.c
@@ -49,7 +49,9 @@ _marpa_avl_create (avl_comparison_func *compare, void *param,
if (tree == NULL)
return NULL;
- my_obstack_begin(&tree->obstack, 0, alignment);
+ my_obstack_begin(&tree->avl_obstack, 0, alignment);
+
+
tree->avl_root = NULL;
tree->avl_compare = compare;
tree->avl_param = param;
@@ -114,7 +116,7 @@ _marpa_avl_probe (AVL_TREE tree, void *item)
da[k++] = dir = cmp > 0;
}
- n = q->avl_link[dir] = my_obstack_alloc (&tree->obstack, sizeof *n);
+ n = q->avl_link[dir] = my_obstack_alloc (&tree->avl_obstack, sizeof *n);
if (n == NULL)
return NULL;
@@ -293,7 +295,7 @@ _marpa_avl_delete (AVL_TREE tree, const void *item)
}
}
- my_obstack_free (&tree->obstack);
+ my_obstack_free (&tree->avl_obstack);
assert (k > 0);
while (--k > 0)
@@ -708,7 +710,7 @@ void
_marpa_avl_destroy (AVL_TREE tree)
{
if (tree == NULL) return;
- my_obstack_free (&tree->obstack);
+ my_obstack_free (&tree->avl_obstack);
my_free (tree);
}
View
4 r2/libmarpa/dev/avl/avl.h
@@ -46,7 +46,7 @@ struct marpa_avl_table
struct avl_node *avl_root; /* Tree's root. */
avl_comparison_func *avl_compare; /* Comparison function. */
void *avl_param; /* Extra argument to |avl_compare|. */
- struct obstack obstack;
+ struct obstack avl_obstack;
size_t avl_count; /* Number of items in tree. */
unsigned long avl_generation; /* Generation number. */
};
@@ -72,7 +72,7 @@ struct avl_traverser
unsigned long avl_generation; /* Generation number. */
};
-#define AVL_OBSTACK(table) (&(table)->obstack)
+#define AVL_OBSTACK(table) (&(table)->avl_obstack)
/* Table functions. */
AVL_TREE _marpa_avl_create (avl_comparison_func *, void *,
Please sign in to comment.
Something went wrong with that request. Please try again.