diff options
author | Bo Yang <teboring@google.com> | 2018-03-09 19:26:20 +0000 |
---|---|---|
committer | Bo Yang <teboring@google.com> | 2018-03-11 16:57:44 +0000 |
commit | f30dd0ff0cead9bb1f8f3b1b295392d75705486b (patch) | |
tree | de4d4673be3e2f0a4c1abcb259527bbb552e1646 /upb/bindings | |
parent | 5029aa439c5f4cc2faebeae4a97ce9bcd7ca8281 (diff) |
Prepare upb_value for encoding/decoding map.
Diffstat (limited to 'upb/bindings')
-rw-r--r-- | upb/bindings/lua/upb/table.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/upb/bindings/lua/upb/table.c b/upb/bindings/lua/upb/table.c index 79120c7..9692df4 100644 --- a/upb/bindings/lua/upb/table.c +++ b/upb/bindings/lua/upb/table.c @@ -33,13 +33,13 @@ static void lupbtable_setnum(lua_State *L, int tab, const char *key, static void lupbtable_pushval(lua_State *L, upb_tabval val, upb_ctype_t ctype) { switch (ctype) { case UPB_CTYPE_INT32: - lua_pushnumber(L, val.val); + lua_pushnumber(L, upb_msgval_getint32(val)); break; case UPB_CTYPE_PTR: - lupb_def_pushwrapper(L, (void*)val.val, NULL); + lupb_def_pushwrapper(L, upb_msgval_getptr(val), NULL); break; case UPB_CTYPE_CSTR: - lua_pushstring(L, (const char*)val.val); + lua_pushstring(L, upb_msgval_getcstr(val)); break; default: luaL_error(L, "Unexpected type: %d", ctype); |