summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-03-28Merge pull request #52 from haberman/oneof-not-defJoshua Haberman
Make OneofDef stop deriving from Def.
2016-03-08Make OneofDef stop deriving from Def.Josh Haberman
It is clear now that oneofs are different form other defs in one important way: they are not top-level constructs that can stand on their own in a SymbolTable, for example. If you are iterating over a list of Defs in a SymbolTable, there is no chance you will run into a oneof. To reflect this reality, OneofDef no longer derives from Def, and the UPB_DEF_ONEOF is no longer an enum value that needs to be handled.
2016-02-21Merge pull request #49 from mbarbon/add-fielddef-indexJoshua Haberman
Add missing FieldDef::index() definition
2016-02-21Add missing FieldDef::index() definitionMattia Barbon
2016-02-18Fixed const correctness of json_nice_escape().Josh Haberman
2016-02-18Merge pull request #48 from jackdoe/masterJoshua Haberman
make googlepb compile with gcc < 4.5.1
2016-02-18indent according to google-style-guideborislav nikolov
https://google.github.io/styleguide/cppguide.html#Constructor_Initializer_Lists ``` // If the signature and initializer list are not all on one line, // you must wrap before the colon and indent 4 spaces: MyClass::MyClass(int var) : some_var_(var), some_other_var_(var + 1) { DoSomething(); } ``` and ``` // As with any other code block, the close curly can be on the same // line as the open curly, if it fits. MyClass::MyClass(int var) : some_var_(var) {} ```
2016-02-17Merge pull request #46 from haberman/jsoncamelJoshua Haberman
Changed JSON parser/printer to correctly camelCase names.
2016-02-17Added assertions for getjsonname() return.Josh Haberman
2016-02-17Addressed code review comments.Josh Haberman
2016-02-17Changed JSON parser/printer to correctly camelCase names.Josh Haberman
2016-02-17make it compile with gcc < 4.5.1borislav nikolov
$ make Q= googlepb g++ -O3 -std=c++98 -pedantic -Wno-long-long -Wall -Wextra -Wpointer-arith -Wno-unused-private-field -I. -DNDEBUG -c -o obj/upb/bindings/googlepb/bridge.o upb/bindings/googlepb/bridge.cc In file included from ./upb/handlers.h:22, from ./upb/bindings/googlepb/bridge.h:42, from upb/bindings/googlepb/bridge.cc:8: ./upb/def.h: In constructor ‘upb::Pointer<upb::Def>::Pointer(upb::Def*)’: ./upb/def.h:39: error: class ‘upb::Pointer<upb::Def>’ does not have any field named ‘PointerBase’ ./upb/def.h:39: error: no matching function for call to ‘upb::PointerBase<upb::Def, upb::RefCounted>::PointerBase()’ ./upb/upb.h:246: note: candidates are: upb::PointerBase<T, Base>::PointerBase(T*) [with T = upb::Def, Base = upb::RefCounted] ./upb/upb.h:244: note: upb::PointerBase<upb::Def, upb::RefCounted>::PointerBase(const upb::PointerBase<upb::Def, upb::RefCounted>&) ... the generated code looks like: template <> class Pointer<upb::Def> : public PointerBase<upb::Def, upb::RefCounted> { public: explicit Pointer(upb::Def* ptr) : PointerBase(ptr) {} }; .. which falls into https://gcc.gnu.org/bugzilla/show_bug.cgi?id=189 (http://stackoverflow.com/questions/8887864/template-base-constructor-call-in-member-initialization-list-error) changing the generated code to: template <> class Pointer<upb::Def> : public PointerBase<upb::Def, upb::RefCounted> { public: explicit Pointer(upb::Def* ptr) : PointerBase<upb::Def, upb::RefCounted>(ptr) {} }; makes it compile at least on 4.4.7 that we are testing with: $ gcc -v Using built-in specs. Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)
2016-01-26Merge pull request #47 from haberman/compactJoshua Haberman
Optimized upb_inttable_compact(): it shrinks inttables more now.
2016-01-26Added small explanatory comment.Josh Haberman
2016-01-19Optimized upb_inttable_compact(): it shrinks inttables more now.Josh Haberman
2016-01-06Merge pull request #45 from mbarbon/fix-status-initJoshua Haberman
Make sure upb_pbdecoder.status is initialized
2016-01-05Merge pull request #44 from mbarbon/masterJoshua Haberman
Add missing upb_fielddef_fullname implementation
2015-12-30Make sure upb_pbdecoder.status is initializedMattia Barbon
Otherwhise the end message callback is passed a garbage value.
2015-12-30Add missing upb_fielddef_fullname implementationMattia Barbon
2015-10-21Merge pull request #43 from haberman/presenceflagJoshua Haberman
Add flag to MessageDef for whether fields have presence.
2015-10-21Addressed PR comments.Josh Haberman
2015-10-15Properly populate field presence flag on messages according to syntax flag.Josh Haberman
2015-10-14Add flag to MessageDef for whether fields have presence.Josh Haberman
2015-08-19Merge pull request #38 from haberman/decoderfix2Joshua Haberman
Added lots of decoder tests and fixed lots of bugs.
2015-08-19Refer to a shared definition for max buffered bytes.Josh Haberman
2015-08-14Added lots of decoder tests and fixed lots of bugs.Josh Haberman
2015-08-13Merge pull request #37 from haberman/google-internalJoshua Haberman
Fix from google3: memory leak caught by heapcheck.
2015-08-13Fix from google3: memory leak caught by heapcheck.Josh Haberman
2015-08-12Merge pull request #36 from haberman/decoderfixJoshua Haberman
Decoder fix: skipped data at end of submessage.
2015-08-11More decoder fixes, and slightly changed parse call semantics.Josh Haberman
Prior to this change, if an error was returned, it would be guaranteed to always return a short byte count. Now the two concepts are a bit more orthogonal. There are cases where the entire input is consumed even though an error was encountered.
2015-07-31Decoder fix: skipped data at end of submessage.Josh Haberman
2015-07-31Merge pull request #34 from haberman/parserskipJoshua Haberman
Changed parser semantics around skipping.
2015-07-30Fixed PR for JIT-enabled builds.Josh Haberman
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-15Merge pull request #33 from haberman/jsonerrJoshua Haberman
Fixed JSON parser error reporting.
2015-07-15Clear JSON parser status in reset.Josh Haberman
2015-07-15Updated JSON parser size.Josh Haberman
2015-07-15Fixed JSON parser error reporting.Josh Haberman
This was previously broken -- it would try to set the status object on the parser, but the pointer was never initialized. Also it didn't report errors properly to the environment object.
2015-07-07Also remove license headers from Lua.Josh Haberman
2015-07-07Updated license headers for Ragel source also.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-07-07Merge pull request #32 from haberman/third_partyJoshua Haberman
Moved lunit to third_party for Google compliance.
2015-07-07Moved lunit to third_party for Google compliance.Josh Haberman
2015-07-07Merge pull request #31 from haberman/third_partyJoshua Haberman
Moved DynASM to third_party to comply with Google policy.
2015-07-07Moved DynASM to third_party to comply with Google policy.Josh Haberman
2015-06-22Merge pull request #30 from haberman/encoderfixJoshua Haberman
Fixed some bad bugs in upb_env.
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-15Merge pull request #29 from haberman/symtabfixJoshua Haberman
Fix for stack overflow for cyclic defs.
2015-06-15Addressed code review comment and clarified comments.Josh Haberman
2015-06-12Fix for stack overflow for cyclic defs.Josh Haberman
Fixes this bug that came up in the Ruby extension: https://github.com/google/protobuf/issues/425
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback