MCPcopy Create free account
hub / github.com/KentBeck/BPlusTree3 / tree_delete

Function tree_delete

python/bplustree_c_src/tree_ops.c:114–125  ·  view source on GitHub ↗

Delete key from tree */

Source from the content-addressed store, hash-verified

112
113/* Delete key from tree */
114int tree_delete(BPlusTree *tree, PyObject *key) {
115 BPlusNode *leaf = tree_find_leaf(tree, key);
116 if (!leaf) return -1;
117
118 int result = node_delete(leaf, key);
119 if (result == 1) {
120 tree->size--; /* Successfully deleted */
121 tree->modification_count++;
122 }
123
124 return result;
125}
126
127/* Get value for key */
128PyObject* tree_get(BPlusTree *tree, PyObject *key) {

Callers 1

BPlusTree_delitemFunction · 0.85

Calls 2

tree_find_leafFunction · 0.85
node_deleteFunction · 0.85

Tested by

no test coverage detected