diff options
author | Chris Fallin <cfallin@google.com> | 2014-12-09 12:27:22 -0800 |
---|---|---|
committer | Chris Fallin <cfallin@google.com> | 2014-12-09 13:23:58 -0800 |
commit | 8f8113b4fff748b57b0ff2f1a301e86b4703be84 (patch) | |
tree | ce16586d7f0a8e5c87252727b4b3745d1a48a4eb /upb/bindings/lua/upb.c | |
parent | e257bd978d5e6278e7b188d543858852c0c4d856 (diff) |
JSON test, symbolic enum names in JSON, and a few improvements.
- Added a JSON test that round-trips (parses then re-serializes) several
test messages, ensuring that the re-serialized form matches the
original exactly.
- Added support for printing and parsing symbolic enum names (rather than
integer values) in JSON.
- Updated JSON printer to properly handle string fields that come in
multiple pieces. ('bytes' fields still do not support this, and this
work is more challenging because it requires making the base64 encoder
resumable. Base64 encoding is not separable at an input-byte
granularity, unlike string escaping.)
- Fixed a < vs. <= bug in UTF-8 encoding generation (oops).
Diffstat (limited to 'upb/bindings/lua/upb.c')
-rw-r--r-- | upb/bindings/lua/upb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/upb/bindings/lua/upb.c b/upb/bindings/lua/upb.c index 2bd78af..17fc0a8 100644 --- a/upb/bindings/lua/upb.c +++ b/upb/bindings/lua/upb.c @@ -1032,7 +1032,7 @@ static int lupb_enumdef_value(lua_State *L) { } else if (type == LUA_TSTRING) { const char *key = lua_tostring(L, 2); int32_t num; - if (upb_enumdef_ntoi(e, key, &num)) { + if (upb_enumdef_ntoiz(e, key, &num)) { lua_pushinteger(L, num); } else { lua_pushnil(L); |