aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* OnShutdownDelete shadowing issueGravatar Ivan Shynkarenka2018-07-10
| | | | https://github.com/google/protobuf/issues/4887
* Merge pull request #4882 from google/3.6.xGravatar Adam Cozzette2018-07-09
|\ | | | | Merge 3.6.x into master
| * Fix initialization with Visual StudioGravatar Adam Cozzette2018-07-06
| | | | | | | | | | | | | | | | | | | | | | | | It appears that Visual Studio does not work well with std::once_flag because it has a bug causing it to initialize that during dynamic initialization instead of constant initialization. This change works around the problem by using function static initializers instead. @gerben-s originally wrote this change for the Google-internal codebase but I am just cherry-picking it here. This fixes #4773.
* | Fix SFINAE in 'RepeatedPtrFieldBase::Add'Gravatar M. Tong2018-07-06
| | | | | | | | | | Without this the error of un-moveable GenericTypeHandler will pop until 'TypeHandler::New(arena_, std::move(value))' is called.
* | Merge pull request #4299 from hekike/feat/add-commonjs-strict-import-styleGravatar Joshua Haberman2018-07-02
|\ \ | | | | | | Feat: add import-style=commonjs_strict option to the compiler
* | | Set LIBPROTOBUF_EXPORT on GenericTypeHandler<class google::protobuf::Message>Gravatar Nehal J Wani2018-07-01
| | | | | | | | | | | | This should fix https://github.com/google/protobuf/issues/4717
* | | Set LIBPROTOBUF_EXPORT on GzipOutputStream::OptionsGravatar Adam Cozzette2018-07-01
| | | | | | | | | | | | | | | | | | | | | This fixes issue #2610. This was originally fixed in a101fa52895fc2ad83d8b5d610243531b1608a08 , but got reverted by d36c0c538a545fac5d9db6ba65c525246d4efa95
* | | Fix to allow a compilation under mips big endian with gccGravatar Charles Hardin2018-06-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The __MIPSEL__ is mips little endian, specific and we needed to compile for a big endian mips target that also happened to be a mips64, so replaced the __MIPSEL__ with a __mip__ which should preserve the build on little endian and allow a build for a big endian setup. $ echo | mips64-linux-gcc -E -dM - ... snip snip ... #define __mips__ 1 #define __MIPSEB__ 1 Signed-off-by: Charles Hardin <ckhardin@gmail.com>
* | | Add -Og to no-warning-test (#4830)Gravatar Paul Yang2018-06-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add -Og to no-warning-test * Initialize value * Implement PrintFieldName in CompactRepeatedFieldPrinter to prevent Woverloaded-virtual * Update generated code
* | | Removed forward declaration of MemBlock classGravatar Michal Matuszak2018-06-25
| | | | | | | | | | | | | | | Removed forward declaration of MemBlock class. Declaration is in conflict with declaration `::strings::MemBlock`
* | | Merge pull request #4827 from acozzette/merge-3-6-xGravatar Adam Cozzette2018-06-25
|\ \ \ | | | | | | | | Merge 3.6.x branch into master
* \ \ \ Merge pull request #4824 from sschuberth/remove-exec-bitGravatar Feng Xiao2018-06-25
|\ \ \ \ | | | | | | | | | | Remove the executable bit from several source code files
* \ \ \ \ Merge pull request #4608 from khuzemap/masterGravatar Feng Xiao2018-06-25
|\ \ \ \ \ | | | | | | | | | | | | Add "override" keyword for overridden virtual functions
* \ \ \ \ \ Merge pull request #4172 from OskarKinomoto/masterGravatar Adam Cozzette2018-06-25
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add guards against bswap_XX redefnitions
| | | | * | | Merge branch '3.6.x' into merge-3-6-xGravatar Adam Cozzette2018-06-25
| |_|_|/| | | |/| | | | |/ | | | | |/|
| | | * / | Remove the executable bit from several source code filesGravatar Sebastian Schuberth2018-06-25
| |_|/ / / |/| | | | | | | | | | | | | | This potentially avoids compiler warnings.
* | | | | Fix parameters declarationGravatar vervaekejonathan2018-06-22
| | | | |
* | | | | Merge pull request #4813 from htuch/fix-any-in-mapGravatar Feng Xiao2018-06-21
|\ \ \ \ \ | | | | | | | | | | | | protostream_objectwriter: fix bug when Any is directly embedded in a …
* \ \ \ \ \ Merge pull request #4812 from htuch/fix-any-caseGravatar Feng Xiao2018-06-21
|\ \ \ \ \ \ | | | | | | | | | | | | | | protostream_objectsource: preserve print options across Any.
* \ \ \ \ \ \ Merge pull request #4811 from htuch/invalid-name-jsonGravatar Feng Xiao2018-06-21
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | json: include field name in InvalidName status messages.
| | * | | | | | Added TODO for grouping options.Gravatar Harvey Tuch2018-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Harvey Tuch <htuch@google.com>
| | | * | | | | protostream_objectwriter: fix bug when Any is directly embedded in a map.Gravatar Harvey Tuch2018-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This came up when trying to round-trip the JSON<->proto3 conversion for Envoy's envoy.admin.v2alpha.ConfigDump (https://github.com/envoyproxy/envoy/blob/b903c1dc984593f8e95e0569c1503dc5d85fbe34/api/envoy/admin/v2alpha/config_dump.proto#L29). Validated fix on the Envoy code base and via the provided unit test. Signed-off-by: Harvey Tuch <htuch@google.com>
| | * | | | | | protostream_objectsource: preserve print options across Any.Gravatar Harvey Tuch2018-06-21
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #4771. Based on the solution included in the issues from @wangjinhua. Validated this works with Envoy's /config_dump JSON rendering. Signed-off-by: Harvey Tuch <htuch@google.com>
| * | | | | | Additional whitespace.Gravatar Harvey Tuch2018-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Harvey Tuch <htuch@google.com>
| * | | | | | json: include field name in InvalidName status messages.Gravatar Harvey Tuch2018-06-21
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is invaluable for chasing down the culprit in failed JSON -> proto conversions. We often see in Envoy that a failed JSON (or indirectly via YAML) configuration won't load but it's unclear why. Signed-off-by: Harvey Tuch <htuch@google.com>
* | | | | | Merge pull request #1261 from gjasny/disable-tls-for-osx-10.6Gravatar Adam Cozzette2018-06-20
|\ \ \ \ \ \ | | | | | | | | | | | | | | Disable thread local storage for OSX < 10.7
* \ \ \ \ \ \ Merge pull request #4780 from mwei0210/masterGravatar Adam Cozzette2018-06-20
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | check provided size to check whether to export
| | | | * | | Add "override" for overridden virtual functionsGravatar Khuzema Pithewan2018-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "override" for overridden virtual functions. Please refer following issue for discussion on this. https://github.com/google/protobuf/issues/67
| * | | | | | not emptyGravatar ming2018-06-19
| | | | | | |
* | | | | | | Merge pull request #4626 from robhancocksed/masterGravatar Feng Xiao2018-06-18
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Declare some generated C++ methods as static #4602
| | * | | | | | check provided sizeGravatar ming2018-06-19
| |/ / / / / / |/| | | | | |
* | | | | | | Merge pull request #2121 from mazurkin/issue-2108Gravatar Feng Xiao2018-06-18
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | issue-2108 [protoc/Java] Excessive copying on buildPartial()
* | | | | | | | proto_writer.h: RenderBytes is an override. Marking it. (#4707)Gravatar medinandres2018-06-18
| | | | | | | | | | | | | | | | | | | | | | | | * proto_writer.h: RenderBytes is an override. Marking it.
* | | | | | | | Merge pull request #4739 from asimshankar/tf-bytesizeGravatar Feng Xiao2018-06-18
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Graceful failure in SerializeToArray().
| | | | | | | * | Work around MSVC issue with std::atomic initialization (#4777)Gravatar Adam Cozzette2018-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Work around MSVC issue with std::atomic initialization MSVC seems to have a bug where it does not use constant initialization for std::atomic, which ends up causing crashes during initialization. This change introduces a workaround by putting the std::atomic inside a union, which causes the compiler to use constant initialization for it. * Added an AppVeyor test for static linking with MSVC
* | | | | | | | | Merge pull request #3901 from wijagels/masterGravatar Feng Xiao2018-06-11
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix unused parameter warnings in generated code with arenas enabled
| | * | | | | | | | Graceful failure in SerializeToArray().Gravatar Asim Shankar2018-06-07
| |/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://github.com/tensorflow/tensorflow/issues/19657 for motivation. But long story short, without this change: m.SerializeToArray(buffer, m.ByteSizeLong()); would result in a CHECK failure if m.ByteSizeLong() returned a value >2GB.
* | | | | | | | | Remove js_embed binary. (#4709)Gravatar Feng Xiao2018-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove js_embed binary.
* | | | | | | | | Added Clang thread-safety annotations in mutex.hGravatar Adam Cozzette2018-05-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For Clang's thread safety analysis (-Wthread-safety) to pass without warnings, we need to annotate WrappedMutex to indicate that Lock() acquires the lock and Unlock() releases it. This CL adds the annotations and guards them with an ifdef to make sure they're a no-op on compilers other than Clang. This is a cherry-pick of a change I already made to the Google-internal codebase.
| | | | | | | * | Move methods out of class (#4697)Gravatar Paul Yang2018-05-30
| | | | | | | | |
| | | | | | | * | Add back GeneratedClassName to public (#4686)Gravatar Paul Yang2018-05-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | These methods are used by grpc
* | | | | | | | | Move methods out of class (#4697)Gravatar Paul Yang2018-05-29
| | | | | | | | |
* | | | | | | | | Add back GeneratedClassName to public (#4686)Gravatar Paul Yang2018-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | These methods are used by grpc
| | | | | | | * | Fixed JS parsing of unspecified map keysGravatar Adam Cozzette2018-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to use a default of 0 when parsing unspecified map keys, instead of failing an assertion. This change was written by Michael Aaron (michaelaaron@google.com) but I am cherry-picking it directly instead of waiting for the next sync of Google-internal changes.
| | | | | | | * | PHP namespaces for nested messages and enums (#4536)Gravatar Brent Shaffer2018-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * uses namespaces for nested messages and enums * fixes namespaces for PHP dist * fixes namespace for Descriptors, adds Cardinality and Kind * fixes nested namespaces for reserved words and adds tests * adds tests and generator fix for php class prefixes * fixes escaping of protobuf packages, enum comments, misc others * nice refactor of generated code * adds class files for backwards compatibility * simplifies code with templates * adds compatibility files to makefile * cleanup of generator and fixes nested namespace bug * regenerates proto types * remove internal BC classes * adds deprecated warning, adds methods back * simplifies if statement * fixes dist files * addresses review comments * adds back TYPE_URL_PREFIX constant * adds @deprecated to old nested class files * skips tests which require a separate process when protobuf.so is enabled * Adds tests for legacy nested classes that do not require separate processes to test * uses legacy names for GPBUtil message check * adds block for IDE @deprecated message * Namespace for nested message/enum in c extension * Remove unused code
| | | | | | | * | PHP array constructors for protobuf messages (#4530)Gravatar Brent Shaffer2018-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP array constructors for protobuf messages * removes Descriptor from error message * allows mergeFrom to accept an array * only use initWithDescriptor if instanceof MapEntry * adds doc comments * removes ability for constructors to take arrays for submessages * Revert "allows mergeFrom to accept an array" This reverts commit b7b72182d561634af12c5c5c56a7cda3b33241f9. * makes mergeFromArray protected and fixes mergeFrom whitespace * Separates merging from JSON and merging from PHP array * removes well-known types and json keys from array construction * Addresses PR review comments * cleans up tests * fixes exception messages
| | | | | | | * | Adopt ruby_package in ruby generated code. (#4627)Gravatar Paul Yang2018-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Adopt ruby_package in ruby generated code. * Add test for ruby_package
| | | | | | | * | Adopt php_metadata_namespace in php code generator (#4622)Gravatar Paul Yang2018-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Adopt php_metadata_namespace in php code generator The php_metadata_namespace is corresponded to the relative directory of the metadata file. e.g., previously, the metadata file of foo.proto was GPBMetadata/Foo.php. If the php_metadata_namespace is "Metadata\\Bar", the metadata file will be Metadata/Bar/Foo.php. * Handle empty php_metadata_namespace
* | | | | | | | | PHP namespaces for nested messages and enums (#4536)Gravatar Brent Shaffer2018-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * uses namespaces for nested messages and enums * fixes namespaces for PHP dist * fixes namespace for Descriptors, adds Cardinality and Kind * fixes nested namespaces for reserved words and adds tests * adds tests and generator fix for php class prefixes * fixes escaping of protobuf packages, enum comments, misc others * nice refactor of generated code * adds class files for backwards compatibility * simplifies code with templates * adds compatibility files to makefile * cleanup of generator and fixes nested namespace bug * regenerates proto types * remove internal BC classes * adds deprecated warning, adds methods back * simplifies if statement * fixes dist files * addresses review comments * adds back TYPE_URL_PREFIX constant * adds @deprecated to old nested class files * skips tests which require a separate process when protobuf.so is enabled * Adds tests for legacy nested classes that do not require separate processes to test * uses legacy names for GPBUtil message check * adds block for IDE @deprecated message * Namespace for nested message/enum in c extension * Remove unused code
* | | | | | | | | PHP array constructors for protobuf messages (#4530)Gravatar Brent Shaffer2018-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP array constructors for protobuf messages * removes Descriptor from error message * allows mergeFrom to accept an array * only use initWithDescriptor if instanceof MapEntry * adds doc comments * removes ability for constructors to take arrays for submessages * Revert "allows mergeFrom to accept an array" This reverts commit b7b72182d561634af12c5c5c56a7cda3b33241f9. * makes mergeFromArray protected and fixes mergeFrom whitespace * Separates merging from JSON and merging from PHP array * removes well-known types and json keys from array construction * Addresses PR review comments * cleans up tests * fixes exception messages