Skip to content

Commit

Permalink
Merge pull request ayende#3 from Cheappie/fix-warns
Browse files Browse the repository at this point in the history
resolve issues like invalid refs, etc
  • Loading branch information
ayende authored Mar 7, 2022
2 parents 263ae44 + bbcea6b commit 87f8780
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ch17/ch17.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ the key to a single mode. The reason I'm not doing that is that in almost all ca
[[hash_get_entries_count]]
.`hash.c` - Getting the count of entries in a hash table
----
include::./code/hash.multi.c[tags=hash_get_entries_count]
include::./code/hash.c[tags=hash_get_entries_count]
----

We haven't looked yet on how `hash_multi_del()` deals with nested hash tables. In <<hash_multi_del>> you can see that we call `hash_del()` on the nested hash table, but we aren't
Expand All @@ -599,7 +599,7 @@ is shown in <<hash_drop_with_nesting>>.
[[hash_drop_with_nesting]]
.`hash.c` - Drop a hash table and all its associated tables
----
include::./code/hash.multi.c[tags=hash_drop_with_nesting]
include::./code/hash.c[tags=hash_drop_with_nesting]
----

The first item in the linked list is the parent hash table, so we'll simply scan from the given `hash_id` and remove all the nested hash tables in the list. The bulk of the work
Expand Down
2 changes: 1 addition & 1 deletion ch17/code/btree.multi.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ result_t btree_multi_cursor_search(btree_cursor_t *cursor) {
}
// end::btree_multi_cursor_search[]

// tag::btree_multi_get_next[]]
// tag::btree_multi_get_next[]
result_t btree_multi_get_next(btree_cursor_t *cursor) {
if (cursor->has_val == false) return success();
span_t k = cursor->key;
Expand Down
4 changes: 2 additions & 2 deletions ch17/code/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ result_t hash_del(txn_t* tx, hash_val_t* del) {
}
// end::hash_del[]

// tag::hash_get_number_of_entries[]
// tag::hash_get_entries_count[]
result_t hash_get_entries_count(
txn_t* tx, uint64_t hash_id, uint64_t* number_of_entries) {
page_t hash_root = {0};
Expand All @@ -660,7 +660,7 @@ result_t hash_get_entries_count(
}
return success();
}
// end::hash_get_number_of_entries[]
// end::hash_get_entries_count[]

// tag::hash_get_next[]
result_t hash_get_next(
Expand Down

0 comments on commit 87f8780

Please sign in to comment.