summaryrefslogtreecommitdiff
path: root/tools/test_cinit.lua
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2013-10-24 12:43:19 -0700
committerJosh Haberman <jhaberman@gmail.com>2013-10-24 12:43:19 -0700
commit26d98ca94f2f049e8767b4a9a33d185a3d7ea0fd (patch)
tree340bcf495f06ed05c9f3fb423f210caf4edce2b1 /tools/test_cinit.lua
parent61109fca1f967771c21dc7184aee35f3b439c577 (diff)
Merge from Google-internal development:
- rewritten decoder; interpreted decoder is bytecode-based, JIT decoder no longer falls back to the interpreter. - C++ improvements: C++11-compatible iterators, upb::reffed_ptr for RAII refcounting, better upcast/downcast support. - removed the gross upb_value abstraction from public upb.h.
Diffstat (limited to 'tools/test_cinit.lua')
-rw-r--r--tools/test_cinit.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/test_cinit.lua b/tools/test_cinit.lua
index bb7977f..72d8826 100644
--- a/tools/test_cinit.lua
+++ b/tools/test_cinit.lua
@@ -48,11 +48,11 @@ if arg[1] == "generate" then
f:write([[int luaopen_staticdefs(lua_State *L) {
lua_newtable(L);
for (int i = 0; i < ELEMENTS(test_msgs); i++) {
- lupb_def_pushnewrapper(L, upb_upcast(&test_msgs[i]), NULL);
+ lupb_def_pushnewrapper(L, UPB_UPCAST(&test_msgs[i]), NULL);
lua_rawseti(L, -2, i + 1);
}
for (int i = 0; i < ELEMENTS(test_enums); i++) {
- lupb_def_pushnewrapper(L, upb_upcast(&test_enums[i]), NULL);
+ lupb_def_pushnewrapper(L, UPB_UPCAST(&test_enums[i]), NULL);
lua_rawseti(L, -2, ELEMENTS(test_msgs) + i + 1);
}
return 1;
@@ -71,7 +71,7 @@ elseif arg[1] == "test" then
assert(enum:full_name() == "MyEnum")
assert(enum:value("FOO") == 1)
assert(f2:name() == "field2")
- assert(f2:msgdef() == msg)
+ assert(f2:containing_type() == msg)
assert(f2:subdef() == enum)
else
error("Unknown operation " .. arg[1])
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback