diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2011-09-12 18:33:06 -0700 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2011-09-12 18:33:06 -0700 |
commit | 887abe669f9a71c5fb530f0315e350ba22a150a7 (patch) | |
tree | 0122e0acc30624102e0a82362f50f0e5dcc970ac /upb/table.h | |
parent | bda3269a42877ae0a0b2b44b579cba5b13d5b1de (diff) |
Added an example, constified some more methods.
Diffstat (limited to 'upb/table.h')
-rw-r--r-- | upb/table.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/upb/table.h b/upb/table.h index a8c2015..f410457 100644 --- a/upb/table.h +++ b/upb/table.h @@ -149,9 +149,10 @@ INLINE size_t _upb_inttable_entrysize(size_t value_size) { return upb_align_up(sizeof(upb_inttable_header) + value_size, 8); } -INLINE void *upb_inttable_fastlookup(upb_inttable *t, uint32_t key, - uint32_t value_size) { - return _upb_inttable_fastlookup(t, key, _upb_inttable_entrysize(value_size), value_size); +INLINE void *upb_inttable_fastlookup(const upb_inttable *t, uint32_t key, + uint32_t value_size) { + return _upb_inttable_fastlookup( + t, key, _upb_inttable_entrysize(value_size), value_size); } INLINE void *upb_inttable_lookup(upb_inttable *t, uint32_t key) { |