summaryrefslogtreecommitdiff
path: root/src/upb_table.c
diff options
context:
space:
mode:
authorJoshua Haberman <joshua@reverberate.org>2009-08-07 20:47:26 -0700
committerJoshua Haberman <joshua@reverberate.org>2009-08-07 20:47:26 -0700
commit8fa6a92f534cb01b6f5b4f48e3982f686d6c3123 (patch)
tree8026d8bd1bdf22c764623195a1cbd2829a0feeaa /src/upb_table.c
parent952ea88db21635f804ba67428ba504d497690d9b (diff)
Major refactoring of upb_msg. Temporary functionality regression.
There is significant refactoring here, as well as some more trivial name changes. upb_msg has become upb_msgdef, to reflect the fact that a upb_msg is not *itself* a message, it describes a message. There are other renamings, such as upb_parse_state -> upb_stream_parser. More significantly, the upb_msg class and parser have been refactored to reflect my recent realization about how memory management should work. upb_msg now has no memory management, and a memory mangement scheme (that works beautifully with multiple language runtimes) will be layered on top of it. This iteration has the new, read-only upb_msg. upb_mm_msg (a memory-managed message class) will come in the next change.
Diffstat (limited to 'src/upb_table.c')
-rw-r--r--src/upb_table.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/upb_table.c b/src/upb_table.c
index 036d175..314594a 100644
--- a/src/upb_table.c
+++ b/src/upb_table.c
@@ -13,7 +13,7 @@
static const upb_inttable_key_t EMPTYENT = 0;
static const double MAX_LOAD = 0.85;
-static uint32_t MurmurHash2(const void *key, size_t len, uint32_t seed);
+uint32_t MurmurHash2(const void *key, size_t len, uint32_t seed);
/* We use 1-based indexes into the table so that 0 can be "NULL". */
static struct upb_inttable_entry *intent(struct upb_inttable *t, int32_t i) {
@@ -238,7 +238,7 @@ void *upb_strtable_next(struct upb_strtable *t, struct upb_strtable_entry *cur)
// 1. It will not work incrementally.
// 2. It will not produce the same results on little-endian and big-endian
// machines.
-static uint32_t MurmurHash2(const void *key, size_t len, uint32_t seed)
+uint32_t MurmurHash2(const void *key, size_t len, uint32_t seed)
{
// 'm' and 'r' are mixing constants generated offline.
// They're not really 'magic', they just happen to work well.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback