Commit 2a2304f3 authored by Yoni Fogel's avatar Yoni Fogel

Addresses #284

Add accessor function for allow_overlaps in range trees.

git-svn-id: file:///svn/tokudb@1824 c7de825b-a66e-492c-adef-691d508d4ae1
parent 16a9e659
......@@ -245,6 +245,8 @@ int toku_rt_successor (toku_range_tree* tree, void* point, toku_range* succ,
return 0;
}
/*
\marginpar{add more \\marginpar\'s}
*/
int toku_rt_get_allow_overlaps(toku_range_tree* tree, BOOL* allowed) {
if (!tree || !allowed) return EINVAL;
*allowed = tree->allow_overlaps;
return 0;
}
......@@ -69,6 +69,17 @@ struct __toku_range_tree_internal {
/* These lines will remain. */
typedef struct __toku_range_tree_internal toku_range_tree;
/**
Gets whether the range tree allows overlapping ranges.
\param tree The range tree.
\param allowed Returns whether overlaps are allowed.
\return
- 0: Success.
- EINVAL: If any pointer argument is NULL. */
int toku_rt_get_allow_overlaps(toku_range_tree* tree, BOOL* allowed);
/**
Creates a range tree.
......@@ -86,7 +97,7 @@ typedef struct __toku_range_tree_internal toku_range_tree;
\return
- 0: Success.
- EINVAL: If any pointer argument is NULL.
- Other exit codes may be forwarded from underlying system calls. */
- Other exit codes may be forwarded from underlying system calls. */
int toku_rt_create(toku_range_tree** ptree, int (*end_cmp)(void*,void*),
int (*data_cmp)(void*,void*), BOOL allow_overlaps,
void* (*user_malloc) (size_t),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment