Generalizing btree to take generic types through void pointers