summaryrefslogtreecommitdiff
path: root/upb/table.h
diff options
context:
space:
mode:
Diffstat (limited to 'upb/table.h')
-rw-r--r--upb/table.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/upb/table.h b/upb/table.h
index bd9a5d4..4a44a6f 100644
--- a/upb/table.h
+++ b/upb/table.h
@@ -11,6 +11,9 @@
* The table uses internal chaining with Brent's variation (inspired by the
* Lua implementation of hash tables). The hash function for strings is
* Austin Appleby's "MurmurHash."
+ *
+ * This header is internal to upb; its interface should not be considered
+ * public or stable.
*/
#ifndef UPB_TABLE_H_
@@ -128,21 +131,16 @@ INLINE void *_upb_inttable_fastlookup(upb_inttable *t, uint32_t key,
upb_inttable_value *arrval =
(upb_inttable_value*)UPB_INDEX(t->array, key, value_size);
if (_upb_inttable_isarrkey(t, key)) {
- //DEBUGPRINTF("array lookup for key %d, &val=%p, has_entry=%d\n", key, val, val->has_entry);
return (arrval->has_entry) ? arrval : NULL;
}
uint32_t bucket = _upb_inttable_bucket(t, key);
upb_inttable_entry *e =
(upb_inttable_entry*)UPB_INDEX(t->t.entries, bucket, entry_size);
- //DEBUGPRINTF("looking in first bucket %d, entry size=%zd, addr=%p\n", bucket, entry_size, e);
while (1) {
- //DEBUGPRINTF("%d, %d, %d\n", e->val.has_entry, e->hdr.key, key);
if (e->hdr.key == key) {
- //DEBUGPRINTF("returning val from hash part\n");
return &e->val;
}
if ((bucket = e->hdr.next) == UPB_END_OF_CHAIN) return NULL;
- //DEBUGPRINTF("looking in bucket %d\n", bucket);
e = (upb_inttable_entry*)UPB_INDEX(t->t.entries, bucket, entry_size);
}
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback