summaryrefslogtreecommitdiff
path: root/upb/bindings
AgeCommit message (Collapse)Author
2019-03-27Moved macros from upb.h to port_def.inc to avoid leaking them to users. (#160)Joshua Haberman
* Use port_def.inc to prevent macros from leaking to users. * Added helpful comments to port_def.inc/port_undef.inc.
2019-03-27Removed reflection and other extraneous things from the core library. (#158)Joshua Haberman
* 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.
2019-03-26Merge branch 'master' into apitweaksJosh Haberman
2019-02-01A few small API tweaks.Josh Haberman
- 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.
2019-01-28Fixes for google3.Josh Haberman
2019-01-17Moved some definitions to def.hJoshua Haberman
2019-01-15Merge branch 'arrayapi' into defcleanupJoshua Haberman
2019-01-14WIP.Joshua Haberman
2019-01-12A lot more tests are working now.Joshua Haberman
2019-01-12Removed old-style C++ handlers that relied on UB in favor of more normal ones.Joshua Haberman
2019-01-09upb_refcounted is gone! Some tests still to fix.Joshua Haberman
2019-01-03Renamed upb_stringview -> upb_strview for C terseness.Josh Haberman
2018-12-13Updated to use the new array accessors.Joshua Haberman
2018-12-10WIP, core library compiles now.Joshua Haberman
2018-12-08Merge branch 'cmake-mac-fixes' into defcleanupJoshua Haberman
2018-09-11WIP.Josh Haberman
2018-09-06Removed unused variable.Joshua Haberman
2018-09-03Changed C API to only define structs, a table, and a few minimal inline ↵Joshua Haberman
functions.
2018-08-22Moved upb_msg parts that depend on def to a separate msgfactory.{c,h}.Josh Haberman
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.
2018-08-21Re-add upb/bindings/stdc++/string.h, which is still used in tests.Josh Haberman
2018-08-21Removed a bunch of obsolete code.Josh Haberman
A lot of this code was experimental or temporarily useful, but is no longer needed.
2018-08-12Enforced that upb_msg lives in an Arena only, and other simplifying.Joshua Haberman
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.
2018-06-14Revert "Prepare upb_value for encoding/decoding map."Bo Yang
This reverts commit f30dd0ff0cead9bb1f8f3b1b295392d75705486b.
2018-03-11Prepare upb_value for encoding/decoding map.Bo Yang
2017-07-11Merge branch 'master' into gencode2Joshua Haberman
2017-07-11Added upb_stringview, the string representation for upb_msg.Joshua Haberman
2017-07-04First version of a real C codegen for upb.Joshua Haberman
Also includes an implementation of the conformance tests to display what the API usage will be like. There is still a lot to do, and things that are broken (oneofs, repeated fields, etc), but it's a good start.
2017-07-02Removed all upb_msgdef/upb_fielddef from upb_msg.Joshua Haberman
2017-07-02Start migrating upb_msglayout to be suitable for generated code.Joshua Haberman
This involves: - remove upb_msglayout -> upb_msgfactory dependency. - remove upb_msglayout -> upb_msgdef dependency (in progress). - make upb_msglayout use a representation that can be statically initialized by generated code. The goal here is that upb_msglayout becomes a kind of "descriptor lite": it contains enough data to parser and serialize protobufs and manipulate a upb_msg in memory, while being far smaller and simpler than a full descriptor. It also does not include field names, which can be a benefit for applications that do not want to leak field names. Generated code can then create a upb_msglayout, and do most things without ever needing to construct full descriptors/defs if they don't want to.
2017-01-21Make upb::SymbolTable no longer reference-counted.Josh Haberman
This transitions it from shared ownership to unique ownership.
2017-01-21Moved upb_symtab to def.h/def.c.Josh Haberman
This is in anticipation of removing refcounting and making upb_symtab (soon to be upb_defpool) the unique owner of all defs inside.
2016-12-12Basic serialization for upb_msg and Lua.Josh Haberman
Doesn't yet include strings, submessages, maps, or repeated fields.
2016-12-07Added a few missing __gc metamethods.Josh Haberman
2016-12-06Changes for PR comments.Josh Haberman
2016-12-05Fleshed out comments and removed some dead code.Josh Haberman
2016-11-29Fixed more bugs surfaced by Travis.Josh Haberman
2016-11-29Removed some temporary code and fixed a few tests.Josh Haberman
2016-11-29New upb_msg code and Lua bindings around it.Josh Haberman
There are still some things that are unfinished, but we are at parity with what Lua had before.
2016-05-12Added UPB_ASSERT() that helps avoid unused var warnings.Joshua Haberman
* Added UPB_ASSERT() that helps avoid unused var warnings. * Addressed PR comments. * Fixed assert in the JIT.
2016-04-21Put oneofs in the same table as fields. (#60)Joshua Haberman
* Put oneofs in the same table as fields. Oneofs and fields are not allowed to have names that conflict, so we might as well put them all in the same table. This also allows an efficient operation that looks for both fields and oneofs in a single lookup. Added support for OneofDef to Lua to allow testing of this. * Addressed PR comments.
2016-04-19Changed schema for JSON test to be defined in a .proto file. (#54)Joshua Haberman
* Changed schema for JSON test to be defined in a .proto file. Before we had lots of code to build these schemas manually, but this was verbose and made it difficult to add to the schema easily. Now we can just write a .proto file and adding fields is easy. To avoid making the tests depend on upbc (and thus Lua) we check in the generated schema. * Made protobuf-compiler a dependency of "make genfiles." * For genfiles download recent protoc that can handle proto3. * Only use new protoc for genfiles.
2016-04-05Added upb::FileDef, which represents the file defs are declared in.Josh Haberman
It is entirely optional: MessageDef/EnumDef can still exist on their own. But this can represent a def's file when it is desirable to do so (eg. for code generators). This approach will require that we change the way we handle extensions. But I think it will be a good change overall. Specifically, we previously handled extensions by duplicating the extended message and then adding the extension as a regular field to the duplicated message. This required also duplicating any messages that could reach the extended message. In the new world we will need a way of declaring and looking up extensions separately from the message being extended. This change also involves some notable changes to the generated code: - files are now called foo.upbdefs.h instead of foo.upb.h. This reflects the fact that we might possibly generate several different output files for a .proto file, and this one is just for defs. - we no longer generate selectors in the .h file. - the upbdefs.c no longer vends a SymbolTable. Now it vends the individual messages (and possibly a FileDef later). I think this will compose better once we can generate files where one generated files imports another. We also make the descriptor reader vend a list of FileDefs now. This is the best conceptual match for parsing a FileDescriptorSet.
2015-07-07Also remove license headers from Lua.Josh Haberman
2015-07-07Brought into compliance with Google open-source policies.Josh Haberman
- removed myself from Author headers in source files. - removed copyright notices from source file headers. - added CONTRIBUTING.md
2015-06-22Fixed some bad bugs in upb_env.Josh Haberman
Also added a unit test for upb_encoder that demonstrates the bugs and the fix.
2015-06-04Fixes from Google-internal.Josh Haberman
2015-06-03Merge branch 'master' into google-internalJosh Haberman
2015-06-03Sync from Google-internal development.Josh Haberman
2015-06-02Ported upb to C89, for greater portability.Josh Haberman
A large part of this change contains surface-level porting, like moving variable declarations to the top of the block. However there are a few more substantial things too: - moved internal-only struct definitions to a separate file (structdefs.int.h), for greater encapsulation and ABI compatibility. - removed the UPB_UPCAST macro, since it requires access to the internal-only struct definitions. Replaced uses with calls to inline, type-safe casting functions. - removed the UPB_DEFINE_CLASS/UPB_DEFINE_STRUCT macros. Class and struct definitions are now more explicit -- you get to see the actual class/struct keywords in the source. The casting convenience functions have been moved into UPB_DECLARE_DERIVED_TYPE() and UPB_DECLARE_DERIVED_TYPE2(). - the new way that we duplicate base methods in derived types is also more convenient and requires less duplication. It is also less greppable, but hopefully that is not too big a problem. Compiler flags (-std=c89 -pedantic) should help to rigorously enforce that the code is free of C99-isms. A few functions are not available in C89 (strtoll). There are temporary, hacky solutions in place.
2015-05-17Restructure tables for C89 port and smaller size.Josh Haberman
Changes the data layout of tables slightly so that string keys are prefixed with their size, rather than the size being inline in the table itself. This has a few benefits: 1. inttables shrink a bit, because there is no longer a wasted and unused size field sitting in them. 2. This avoids the need to have a union in the table. This is important for an impending C89 port of upb, since C89 has literally no way of statically initializing a non-first union member.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback