summaryrefslogtreecommitdiff
path: root/upb/sink.h
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-01-25A few more fixes.Josh Haberman
2019-01-15Take sinks by value.Joshua Haberman
2019-01-14WIP.Joshua Haberman
2019-01-12All tests pass again!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
2017-09-19Reserve unknown fields in upbBo Yang
1. For decoding, an unknownfields will be lazily created on message, which contains bytes of unknown fields. 2. For encoding, if the unknownfields is present on message, all bytes contained in it will be serialized.
2016-12-12A few C++ fixes for BufferSink.Josh Haberman
2016-12-12Basic serialization for upb_msg and Lua.Josh Haberman
Doesn't yet include strings, submessages, maps, or repeated fields.
2015-07-30Changed parser semantics around skipping.Josh Haberman
Prior to this change: parse(buf, len) -> len + N ...would indicate that the next N bytes of the input are not needed, *and* would advance the decoding position by this much. After this change: parse(buf, len) -> len + N parse(NULL, N) -> N ...can be used to achieve the same thing. But skipping the N bytes is not explicitly performed by the user. A user that doesn't want/need to skip can just say: parsed = parse(buf, len); if (parsed < len) { // Handle suspend, advance stream by "parsed". } else { // Stream was advanced by "len" (even if parsed > len). } Updated unit tests to test this new behavior, and refactored test utility code a bit to support it.
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-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-08Google-internal development.Josh Haberman
2014-12-03Sync from Google-internal development.Josh Haberman
Most notably, a JSON parser is now provided.
2014-07-02Sync from internal Google development.Josh Haberman
2014-06-26Sync from internal Google development.Josh Haberman
2014-01-21Sync to internal Google development.Josh Haberman
2013-12-20Sync from Google-internal development.Josh Haberman
2013-10-24Merge from Google-internal development:Josh Haberman
- 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.
2013-05-28Merge from Google-internal development.Josh Haberman
- Better error reporting for upb::Def setters. - error reporting for upb::Handlers setters. - made the start/endmsg handlers a little less special-cased.
2013-05-25Synced with Google-internal development.Josh Haberman
C++ handlers are now type-safe; SinkFrame is gone. Various other changes.
2013-05-11Synced with 3 months of Google-internal development.Josh Haberman
Major changes: - Got rid of all bytestream interfaces in favor of using regular handlers. - new Pipeline object represents a upb pipeline, does bump allocation internally to manage memory. - proto2 support now can handle extensions.
2013-02-15Sync with 8 months of Google-internal development.Josh Haberman
Many things have changed and been simplified. The memory-management story for upb_def and upb_handlers is much more robust; upb_def and upb_handlers should be fairly stable interfaces now. There is still much work to do for the runtime component (upb_sink).
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback