Joshua Haberman
ca84145476
[decoder] fix for buf=NULL, size=0 case. ( #246 )
5 years ago
Joshua Haberman
46b93f8cea
A bit more cleanup in the decoder.
5 years ago
Joshua Haberman
ad2eb65a4b
Refactored conformance_upb to use reflection, and fixed a decoder bug.
5 years ago
Joshua Haberman
9a870d957f
Removed upb_decframe and made ptr an explicit parameter and return.
5 years ago
Joshua Haberman
e911aae5f6
Factored upb_map_entry into a shared place.
5 years ago
Anna R
d2389ba261
Add correctness asserts to upb_addmsg
5 years ago
Joshua Haberman
744f8588da
Cleanup to remove END_GROUP from descriptortype -> type tables.
5 years ago
Joshua Haberman
d541566a7b
Moved upb_array_new() to upb/reflection.h where it belongs.
5 years ago
Joshua Haberman
2a85bef825
Generated code interface for maps is complete, though not yet tested.
5 years ago
Joshua Haberman
6c2d732082
Fixed upb's map parsing to overwrite existing elements.
5 years ago
Joshua Haberman
090a0c33a4
Fixed VLA error and rewrote the map parsing code to be clearer.
5 years ago
Joshua Haberman
0fbae939d2
Removed stray fprintf().
5 years ago
Joshua Haberman
382f92a87f
Maps encode and decode successfully!
5 years ago
Joshua Haberman
4c57b1fefd
More progress on Lua extension.
5 years ago
Joshua Haberman
23825332e1
WIP.
5 years ago
Joshua Haberman
dc58b657ee
New reflection API doesn't need types as parameters for map/array.
...
All tests are passing again.
5 years ago
Joshua Haberman
1ed64db8c2
Fixed compiler error "error: control reaches end of non-void function".
5 years ago
Esun Kim
a8bb192fa4
Fixed -Wshorten-64-to-32
5 years ago
Joshua Haberman
9960d7c772
Renamed end_group field number and updated documentation.
6 years ago
Joshua Haberman
da4e616860
Removed type from upb_array also.
6 years ago
Joshua Haberman
56779f09eb
All tests pass again.
6 years ago
Joshua Haberman
ba0a2fb955
Compiles, doesn't work yet.
6 years ago
Joshua Haberman
7485261370
WIP.
6 years ago
Joshua Haberman
a8f719c98d
Added checks for OOM conditions.
6 years ago
Josh Haberman
cd9e1e6817
upb_proto_library() aspect is working, even for external repos.
6 years ago
Josh Haberman
932753d91e
WIP.
6 years ago
Joshua Haberman
cf35baa1ad
Moved macros from upb.h to port_def.inc to avoid leaking them to users. ( #160 )
...
* Use port_def.inc to prevent macros from leaking to users.
* Added helpful comments to port_def.inc/port_undef.inc.
6 years ago
Joshua Haberman
928ef7f2c0
Removed reflection and other extraneous things from the core library. ( #158 )
...
* Removed reflection and other extraneous things from the core library.
* Added missing files and ran buildifier.
* New CMakeLists.txt.
* Made table its own cc_library() for internal usage.
6 years ago
Josh Haberman
32e3f394b4
A few small API tweaks.
...
- Foo_parsenew() -> Foo_parse().
- parse function takes plain (const char*, size_t) instead of
upb_strview. The latter is mainly useful for strings inside
message objects.
6 years ago
Josh Haberman
9ea6bb4678
Renamed upb_stringview -> upb_strview for C terseness.
6 years ago
Josh Haberman
b79fd65a83
WIP.
6 years ago
Josh Haberman
a105c015b1
Added support for unknown fields to upb_msg.
...
After this CL, upb passes all existing proto3 conformance tests.
However the conformance suite is missing a lot of cases and should
be fleshed out.
6 years ago
Josh Haberman
4a7bc85d72
Fixed some c89 errors.
6 years ago
Josh Haberman
340bd01338
Removed default instance and oneof array from tables.
6 years ago
Joshua Haberman
1d4957a9a6
Removed unused parameter.
6 years ago
Joshua Haberman
287ab94800
A few more compile fixes.
6 years ago
Joshua Haberman
f7713ebc39
Changed C API to use inline functions and computed offsets.
6 years ago
Joshua Haberman
694d51f4d6
Changed C API to only define structs, a table, and a few minimal inline functions.
6 years ago
Josh Haberman
e94ac4f757
Moved upb_msg parts that depend on def to a separate msgfactory.{c,h}.
...
Also got rid of the premature "v1" business that was attempting
to create a binary compatibility story.
Also added an in-progress CMakeLists.txt file.
6 years ago
Joshua Haberman
c8f6a27e6b
Enforced that upb_msg lives in an Arena only, and other simplifying.
...
upb_msg was trying to be general enough that it could either live in
an arena or be allocated with malloc()/free(). This was too much
complexity for too little benefit. We should commit to just saying
that upb_msg is arena-only.
I also ripped out the code to glue upb_msg to the existing
handlers-based encoder/decoder. upb_msg has its own, small, simple
encoder/decoder. I'm trying to whittle down upb_msg to a small
and simple core.
I updated the Lua extension for these changes. Lua needs some more
work to properly create arenas per message. For now I just created
a single global arena.
6 years ago
Bo Yang
86dec3021f
Implement decoding repeated message field.
7 years ago
Bo Yang
93aaf99347
Fix parsing sub-message field.
...
Buffer start place needs to be adjusted before parsing sub-message.
7 years ago
Bo Yang
ba93474aa2
Fix oneof encoding/decoding
7 years ago
Bo Yang
cafebf6bee
For encoding upb needs descriptor type instead of type.
7 years ago
Bo Yang
ee7b049d19
Initialize tag to make compiler happy.
7 years ago
Joshua Haberman
72c333eb03
Fixed amalgamated build.
7 years ago
Joshua Haberman
058a17f6a6
Fix amalgamated build.
7 years ago
Joshua Haberman
98f513fb8f
Fixed 32-bit build and added generated files.
7 years ago
Joshua Haberman
6b87674221
Address review comments and fix compile warnings.
7 years ago
Joshua Haberman
806ffc1d20
Responded to PR comments.
7 years ago