summaryrefslogtreecommitdiff
path: root/upb/bindings
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2015-05-28 09:43:25 -0700
committerJoshua Haberman <jhaberman@gmail.com>2015-05-28 09:43:25 -0700
commit0b64534a4450d6d198ce617209ebe38816b028ef (patch)
tree6e528d4ffc3a56d16a24ebfa8f4894cae0d39968 /upb/bindings
parente6dddd6c175cb23946c2d36180b3c2ef8d30e6ec (diff)
parent2cff15d35e4ff862e6a0811ae9e509c3d3352514 (diff)
Merge pull request #21 from google/tablestrings
Restructure tables for C89 port and smaller size.
Diffstat (limited to 'upb/bindings')
-rw-r--r--upb/bindings/lua/upb/table.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/upb/bindings/lua/upb/table.c b/upb/bindings/lua/upb/table.c
index e574ab0..4bda63d 100644
--- a/upb/bindings/lua/upb/table.c
+++ b/upb/bindings/lua/upb/table.c
@@ -66,9 +66,11 @@ static void lupbtable_pushent(lua_State *L, const upb_tabent *e,
lua_newtable(L);
if (!upb_tabent_isempty(e)) {
if (inttab) {
- lua_pushnumber(L, e->key.num);
+ lua_pushnumber(L, e->key);
} else {
- lua_pushlstring(L, e->key.s.str, e->key.s.length);
+ uint32_t len;
+ const char *str = upb_tabstr(e->key, &len);
+ lua_pushlstring(L, str, len);
}
lua_setfield(L, -2, "key");
lupbtable_pushval(L, e->val, ctype);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback