Beispiel #1
0
bool split (void *child, branch_s *parent, int k, unint len)
{
	switch (type(child)) {
	case LEAF:	return split_leaf(child, parent, k, len);
	case BRANCH:	return split_branch(child, parent, k);
	default:	return FALSE;
	}
}
Beispiel #2
0
static BtNode_s *split (BtNode_s *parent, BtNode_s *node)
{
FN;
	if (node->is_leaf) {
		return split_leaf(parent, node);
	} else {
		return split_branch(parent, node);
	}
}
Beispiel #3
0
static bool split_node (
	tree_s		*tree,
	branch_s	*parent,
	void		*child,
	s64		k,
	unint		size)
{
	switch (magic(child)) {
	case LEAF:	return split_leaf(tree, parent, child, k, size);
	case BRANCH:	return split_branch(tree, parent, child, k);
	default:	return FALSE;
	}
}