aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | Adopt php_metadata_namespace in php code generator (#4622)Paul Yang2018-05-251-17/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| | * | Make sure to delete temporary maps used by FileDescriptorTablesAdam Cozzette2018-05-241-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I ran the tcmalloc heap checker in draconian mode, and it reported some heap allocations that were still reachable when protobuf-test exited. To fix that, I updated FileDescriptorTables to make sure its temporary heap-allocated maps are deleted when it is destroyed.
| | * | Update version number to 3.6.0Jisi Liu2018-05-1414-32/+32
| | | |
* | | | Merge pull request #4824 from sschuberth/remove-exec-bitFeng Xiao2018-06-257-0/+0
|\ \ \ \ | | | | | | | | | | Remove the executable bit from several source code files
| * | | | Remove the executable bit from several source code filesSebastian Schuberth2018-06-257-0/+0
| |/ / / | | | | | | | | | | | | This potentially avoids compiler warnings.
* | | | Merge pull request #4608 from khuzemap/masterFeng Xiao2018-06-2536-448/+473
|\ \ \ \ | | | | | | | | | | Add "override" keyword for overridden virtual functions
| * | | | Add "override" for overridden virtual functionsKhuzema Pithewan2018-06-1936-449/+474
| | |_|/ | |/| | | | | | | | | | | | | | | | | | Add "override" for overridden virtual functions. Please refer following issue for discussion on this. https://github.com/google/protobuf/issues/67
* | | | Merge pull request #4172 from OskarKinomoto/masterAdam Cozzette2018-06-251-0/+8
|\ \ \ \ | |_|/ / |/| | | Add guards against bswap_XX redefnitions
| * | | Add guards against bswap_XX redefnitionsOskar Świtalski2018-01-151-0/+8
| | | | | | | | | | | | | | | | Signed-off-by: Oskar Świtalski <oskar.switalski@indoorway.com>
* | | | Fix parameters declarationvervaekejonathan2018-06-221-2/+2
| | | |
* | | | Merge pull request #4813 from htuch/fix-any-in-mapFeng Xiao2018-06-214-2/+21
|\ \ \ \ | | | | | | | | | | protostream_objectwriter: fix bug when Any is directly embedded in a …
| * | | | protostream_objectwriter: fix bug when Any is directly embedded in a map.Harvey Tuch2018-06-214-2/+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>
* | | | | Merge pull request #4812 from htuch/fix-any-caseFeng Xiao2018-06-213-0/+88
|\ \ \ \ \ | | | | | | | | | | | | protostream_objectsource: preserve print options across Any.
| * | | | | Added TODO for grouping options.Harvey Tuch2018-06-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Harvey Tuch <htuch@google.com>
| * | | | | protostream_objectsource: preserve print options across Any.Harvey Tuch2018-06-213-0/+85
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | Merge pull request #4811 from htuch/invalid-name-jsonFeng Xiao2018-06-211-1/+2
|\ \ \ \ \ | | | | | | | | | | | | json: include field name in InvalidName status messages.
| * | | | | Additional whitespace.Harvey Tuch2018-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Harvey Tuch <htuch@google.com>
| * | | | | json: include field name in InvalidName status messages.Harvey Tuch2018-06-211-1/+2
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.6Adam Cozzette2018-06-201-0/+6
|\ \ \ \ \ | | | | | | | | | | | | Disable thread local storage for OSX < 10.7
| * | | | | Disable thread local storage for OSX < 10.7Gregor Jasny2016-02-191-0/+6
| | | | | |
* | | | | | Merge pull request #4780 from mwei0210/masterAdam Cozzette2018-06-201-1/+2
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | check provided size to check whether to export
| * | | | | not emptyming2018-06-191-1/+1
| | | | | |
| * | | | | check provided sizeming2018-06-191-1/+2
| | | | | |
* | | | | | Merge pull request #4626 from robhancocksed/masterFeng Xiao2018-06-1813-39/+39
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Declare some generated C++ methods as static #4602
| * | | | | Declare some generated C++ methods as static #4602Robert Hancock2018-05-1413-39/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids compile warnings when compiling generated code with the -Wmissing-declarations option.
* | | | | | Merge pull request #2121 from mazurkin/issue-2108Feng Xiao2018-06-185-22/+44
|\ \ \ \ \ \ | | | | | | | | | | | | | | issue-2108 [protoc/Java] Excessive copying on buildPartial()
| * | | | | | [issue-2108] [protoc/java] Excessive copying on buildPartial()Nickolay Mazurkin2016-09-185-22/+44
| | | | | | |
* | | | | | | proto_writer.h: RenderBytes is an override. Marking it. (#4707)medinandres2018-06-181-1/+1
| | | | | | | | | | | | | | | | | | | | | * proto_writer.h: RenderBytes is an override. Marking it.
* | | | | | | Merge pull request #4739 from asimshankar/tf-bytesizeFeng Xiao2018-06-181-1/+5
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Graceful failure in SerializeToArray().
| * | | | | | | Graceful failure in SerializeToArray().Asim Shankar2018-06-071-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | | Merge pull request #3901 from wijagels/masterFeng Xiao2018-06-112-28/+28
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | Fix unused parameter warnings in generated code with arenas enabled
| * | | | | | | Stop unused parameter warnings for generated code in RegisteredArenaDtorWilliam Jagels2017-11-162-28/+28
| | | | | | | |
* | | | | | | | Remove js_embed binary. (#4709)Feng Xiao2018-06-013-130/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove js_embed binary.
* | | | | | | | Added Clang thread-safety annotations in mutex.hAdam Cozzette2018-05-301-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)Paul Yang2018-05-292-15/+26
| | | | | | | |
* | | | | | | | Add back GeneratedClassName to public (#4686)Paul Yang2018-05-251-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | These methods are used by grpc
* | | | | | | | PHP namespaces for nested messages and enums (#4536)Brent Shaffer2018-05-242-145/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)Brent Shaffer2018-05-241-8/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)Paul Yang2018-05-171-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Adopt ruby_package in ruby generated code. * Add test for ruby_package
* | | | | | | | re-write int128 long division to avoid license impact from stackoverflow ↵NickFengIBM2018-05-171-34/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | references (#4633) * rewrite int128 long divison to avoid stackoverflow hit Protobuf was showing Stackoverflow hits in the code base, primarily code written to calculate long division. This code was copied from a stackoverflow post, which means it would be licensed under CC BY-SA 3.0. Due to this license, IBM Legal did not want to include this OSS in our products and advised us to re-write this particular piece of code to avoid the license restriction. We have re-written the code for our own distribution, and are willing to merge it into the main code base for others who want to avoid the stackoverflow license issues to benefit as well.
* | | | | | | | Merge pull request #4624 from eughermann/hash-ub-fixAdam Cozzette2018-05-151-7/+7
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Fix undefined behavior in hash function.
| * | | | | | | | Remove undefined behavior from the hash function.Eugene Hermann2018-05-141-7/+7
| | |_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed integer overflow creates undefined behavior that may lead to unpredictable fails on different platforms. One known example of the hardware where this code did fail is Apple A6 (32-bit Apple Swift CPU) 16777619, 16777499 - two prime numbers that typically used to get better dispersion.
* | | | | | | | Adopt php_metadata_namespace in php code generator (#4622)Paul Yang2018-05-141-17/+37
| |_|_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | | | | | | fix index out of range error in C# generation using msvc (#1329)Warren Falk2018-05-141-1/+1
|/ / / / / /
* | | | | / Add file option php_metadata_namespace and ruby_package (#4609)Paul Yang2018-05-113-165/+535
| |_|_|_|/ |/| | | |
* | | | | Fix error in Clang UndefinedBehaviorSanitizerPetter Strandmark2018-05-041-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pointer Arguments to memcpy can not be null in UndefinedBehaviorSanitizer. In this case, both the memory and the size was zero. This change allows protoc to run under UndefinedBehaviorSanitizer.
* | | | | MinGW build failedIvan Shynkarenka2018-05-021-1/+1
| | | | |
* | | | | typoBrady Killeen2018-04-261-1/+1
| | | | |
* | | | | Write messages to backing field in generated C# cloning code (#4440)Sydney Acksman2018-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Edited MessageFieldGenerator to clone to backing field instead of property * Generated C# proto code
* | | | | Merge pull request #4504 from xfxyjwf/liteFeng Xiao2018-04-181-0/+10
|\ \ \ \ \ | | | | | | | | | | | | Cleanup + documentation for Java Lite runtime.