aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/message.cc
Commit message (Collapse)AuthorAge
* 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.
* | 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
* Integrated internal changes from GoogleGravatar Adam Cozzette2018-03-13
|
* Explicitly propagate the status of Flush().Gravatar Jisi Liu2017-12-13
| | | | | | | Before the change, an implicit Flush() will be triggered in the destructor of the input stream. However, the return code of Flush() is not discarded. This change makes sure when Flush() fails, we will return false.
* Integrated internal changes from GoogleGravatar Adam Cozzette2017-09-14
|
* Merge from Google internal for 3.4 releaseGravatar Jisi Liu2017-07-18
|
* Down-integrate from google3.Gravatar Feng Xiao2017-03-29
|
* Fix unresolved symbols with MSVC12 and /Zc:inlineGravatar Marcel Raad2017-02-17
| | | | | | | In #726 and #813, linking errors with MSVC14 were resolved. The change in MSVC12 leading to these errors was not a newly introduced bug, but that /Zc:inline was made on by default. This option is also available with MSVC12, so the workaround should be applied for it too.
* Merge 3.2.x branch into master (#2648)Gravatar Paul Yang2017-01-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Down-integrate internal changes to github. * Update conformance test failure list. * Explicitly import used class in nano test to avoid random test fail. * Update _GNUC_VER to use the correct implementation of atomic operation on Mac. * maps_test.js: check whether Symbol is defined before using it (#2524) Symbol is not yet available on older versions of Node.js and so this test fails with them. This change just directly checks whether Symbol is available before we try to use it. * Added well_known_types_embed.cc to CLEANFILES so that it gets cleaned up * Updated Makefile.am to fix out-of-tree builds * Added Bazel genrule for generating well_known_types_embed.cc In pull request #2517 I made this change for the CMake and autotools builds but forgot to do it for the Bazel build. * Update _GNUC_VER to use the correct implementation of atomic operation on Mac. * Add new js file in extra dist. * Bump version number to 3.2.0 * Fixed issue with autoloading - Invalid paths (#2538) * PHP fix int64 decoding (#2516) * fix int64 decoding * fix int64 decoding + tests * Fix int64 decoding on 32-bit machines. * Fix warning in compiler/js/embed.cc embed.cc: In function ‘std::string CEscape(const string&)’: embed.cc:51:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < str.size(); ++i) { ^ * Fix include in auto-generated well_known_types_embed.cc Restore include style fix (e3da722) that has been trampled by auto-generation of well_known_types_embed.cc * Fixed cross compilations with the Autotools build Pull request #2517 caused cross compilations to start failing, because the js_embed binary was being built to run on the target platform instead of on the build machine. This change updates the Autotools build to use the AX_PROG_CXX_FOR_BUILD macro to find a suitable compiler for the build machine and always use that when building js_embed. * Minor fix for autocreated object repeated fields and maps. - If setting/clearing a repeated field/map that was objects, check the class before checking the autocreator. - Just to be paranoid, don’t mutate within copy/mutableCopy for the autocreated classes to ensure there is less chance of issues if someone does something really crazy threading wise. - Some more tests for the internal AutocreatedArray/AutocreatedDictionary classes to ensure things are working as expected. - Add Xcode 8.2 to the full_mac_build.sh supported list. * Fix generation of extending nested messages in JavaScript (#2439) * Fix generation of extending nested messages in JavaScript * Added missing test8.proto to build * Fix generated code when there is no namespace but there is enum definition. * Decoding unknown field should succeed. * Add embed.cc in src/Makefile.am to fix dist check. * Fixed "make distcheck" for the Autotools build To make the test pass I needed to fix out-of-tree builds and update EXTRA_DIST and CLEANFILES. * Remove redundent embed.cc from src/Makefile.am * Update version number to 3.2.0-rc.1 (#2578) * Change protoc-artifacts version to 3.2.0-rc.1 * Update version number to 3.2.0rc2 * Update change logs for 3.2.0 release. * Update php README * Update upb, fixes some bugs (including a hash table problem). (#2611) * Update upb, fixes some bugs (including a hash table problem). * Ruby: added a test for the previous hash table corruption. Verified that this triggers the bug in the currently released version. * Ruby: bugfix for SEGV. * Ruby: removed old code for dup'ing defs. * Reverting deployment target to 7.0 (#2618) The Protobuf library doesn’t require the 7.1 deployment target so reverting it back to 7.0 * Fix typo that breaks builds on big-endian (#2632) * Bump version number to 3.2.0
* Integrated internal changes from GoogleGravatar Adam Cozzette2016-11-17
|
* Integrate internal changesGravatar Bo Yang2016-10-10
|
* Integrate from internal code base.Gravatar Feng Xiao2016-07-13
|
* Integrate google internal changes.Gravatar Jisi Liu2016-03-30
|
* Merge remote-tracking branch 'origin/master' into fix-authorGravatar Jisi Liu2015-10-05
|\
* | Down-integrate from google internal.Gravatar Jisi Liu2015-10-05
| |
| * Add GOOGLE_ATTRIBUTE_NOINLINE to GetArena() and GetMaybeArenaPointer() ↵Gravatar 0xAAE2015-09-15
|/ | | | methods. This is to avoid "unresolved link" errors in MSVC 2015 during Release build
* Merge remote-tracking branch 'origin/master' into beta-1Gravatar Feng Xiao2015-08-25
|\
* | Down-integrate from google3.Gravatar Feng Xiao2015-08-22
| |
| * Define GOOGLE_ATTRIBUTE_NOINLINE for MSVC. Workaround for VS2015 Release ↵Gravatar Douglas Heriot2015-08-22
|/ | | | | | | | | | | build compiler bug. See issue #240 - MSVC in VS2015 seems to inline a function it shouldn't. My original workaround was to disable inlining for the whole file, but I found a way to do it on just this specific function using __declspec(noinline). Unfortunately __declspec has to go at the start of the function declaration, while __attribute in GCC can go either before or after. I had to move lots of GOOGLE_ATTRIBUTE_NOLINE to make it compile. I have not yet tested this change with GCC. Will there be other side effects of defining this, given it wasn't previously? I also noticed a few functions marked with both the 'inline' keyword, and GOOGLE_ATTRIBUTE_NOINLINE - huh? Is there an explanation for this, or is it an oversight?
* down-integrate internal changesGravatar Bo Yang2015-05-21
|
* Down integrate from Google internal branch for C++ and Java.Gravatar Jisi Liu2015-02-28
| | | | | | | | - Maps for C++ lite - C++ Arena optimizations. - Java Lite runtime code size optimization. Change-Id: I7537a4357c1cb385d23f9e8aa7ffdfeefe079f13
* Add shutdown code for several newly introduced leaks;Gravatar Jisi Liu2015-02-21
| | | | | | Disable commandline interface test for heap check tests. Change-Id: I02aa2ad9704e3c70dcecae8b3b3557b18607d455
* Down-integrate from internal code base (C++ maps support).Gravatar Feng Xiao2014-11-14
|
* Down-integrate from internal code base.Gravatar Feng Xiao2014-11-10
|
* Replace links to code.google.com/protobuf with ↵Gravatar Feng Xiao2014-10-01
| | | | developers.google.com/protocol-buffers
* Add iostream in message.cc. Remove unused in coded_stream_unittest.ccGravatar jieluo@google.com2014-07-18
|
* down integrate to svnGravatar jieluo@google.com2014-07-18
|
* Down-integrate pending changes from internal repository after previous release.Gravatar liujisi@google.com2014-05-28
|
* Fix issue 403, issue 456, issue 462Gravatar xiaofeng@google.com2013-02-25
|
* Fix issue 445, issue 449Gravatar xiaofeng@google.com2013-02-07
|
* Rollback the export macros on internal classes/functions.Gravatar liujisi@google.com2013-01-15
|
* add missing dll export macros for msvc.Gravatar liujisi@google.com2013-01-11
|
* Down-integrate from internal branchGravatar xiaofeng@google.com2012-09-22
|
* When serializing to an ostream, verify that there were no stream-level ↵Gravatar kenton@google.com2009-12-22
| | | | errors before returning success.
* Ensure that 'once' objects are declared using the macro. This is either the ↵Gravatar temporal2009-12-18
| | | | third or fourth time I've screwed this up when down-integrating, because our internal code does not require the macro (it's not portable) and on Linux a pthread_once_t that is zero-initialized just happens to work. So, I only discover the problem when I test on Mac, then kick myself for making the same mistake yet again. No more! This time, I have renamed GoogleOnceType to ProtobufOnceType, thus making the type name differ from our internal code. As a result, if you don't update the decls to use the macros, they won't compile. Hah! Take that, future self!
* Massive roll-up of changes. See CHANGES.txt.Gravatar kenton@google.com2009-12-18
|
* Make sure GeneratedMessageFactory is deleted on shutdown.Gravatar kenton@google.com2009-08-06
|
* Submit recent changes from internal branch, including "lite mode" forGravatar kenton@google.com2009-07-29
| | | | | C++ and Java. See CHANGES.txt for more details.
* Integrate recent changes from Google-internal code tree. See CHANGES.txtGravatar kenton@google.com2009-04-25
| | | | | for details.
* Push out changes from internal codebase.Gravatar kenton@google.com2009-01-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All Languages * Repeated fields of primitive types (types other that string, group, and nested messages) may now use the option [packed = true] to get a more efficient encoding. In the new encoding, the entire list is written as a single byte blob using the "length-delimited" wire type. Within this blob, the individual values are encoded the same way they would be normally except without a tag before each value (thus, they are tightly "packed"). C++ * UnknownFieldSet now supports STL-like iteration. * Message interface has method ParseFromBoundedZeroCopyStream() which parses a limited number of bytes from an input stream rather than parsing until EOF. Java * Fixed bug where Message.mergeFrom(Message) failed to merge extensions. * Message interface has new method toBuilder() which is equivalent to newBuilderForType().mergeFrom(this). * All enums now implement the ProtocolMessageEnum interface. * Setting a field to null now throws NullPointerException. * Fixed tendency for TextFormat's parsing to overflow the stack when parsing large string values. The underlying problem is with Java's regex implementation (which unfortunately uses recursive backtracking rather than building an NFA). Worked around by making use of possesive quantifiers. Python * Updated RPC interfaces to allow for blocking operation. A client may now pass None for a callback when making an RPC, in which case the call will block until the response is received, and the response object will be returned directly to the caller. This interface change cannot be used in practice until RPC implementations are updated to implement it.
* Integrate changes from internal code.Gravatar kenton@google.com2008-11-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | protoc * Enum values may now have custom options, using syntax similar to field options. * Fixed bug where .proto files which use custom options but don't actually define them (i.e. they import another .proto file defining the options) had to explicitly import descriptor.proto. * Adjacent string literals in .proto files will now be concatenated, like in C. C++ * Generated message classes now have a Swap() method which efficiently swaps the contents of two objects. * All message classes now have a SpaceUsed() method which returns an estimate of the number of bytes of allocated memory currently owned by the object. This is particularly useful when you are reusing a single message object to improve performance but want to make sure it doesn't bloat up too large. * New method Message::SerializeAsString() returns a string containing the serialized data. May be more convenient than calling SerializeToString(string*). * In debug mode, log error messages when string-type fields are found to contain bytes that are not valid UTF-8. * Fixed bug where a message with multiple extension ranges couldn't parse extensions. * Fixed bug where MergeFrom(const Message&) didn't do anything if invoked on a message that contained no fields (but possibly contained extensions). * Fixed ShortDebugString() to not be O(n^2). Durr. * Fixed crash in TextFormat parsing if the first token in the input caused a tokenization error. Java * New overload of mergeFrom() which parses a slice of a byte array instead of the whole thing. * New method ByteString.asReadOnlyByteBuffer() does what it sounds like. * Improved performance of isInitialized() when optimizing for code size. Python * Corrected ListFields() signature in Message base class to match what subclasses actually implement. * Some minor refactoring.
* Integrate changes from internal Google-internal branch.Gravatar kenton@google.com2008-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | General * License changed from Apache 2.0 to New BSD. * It is now possible to define custom "options", which are basically annotations which may be placed on definitions in a .proto file. For example, you might define a field option called "foo" like so: import "google/protobuf/descriptor.proto" extend google.protobuf.FieldOptions { optional string foo = 12345; } Then you annotate a field using the "foo" option: message MyMessage { optional int32 some_field = 1 [(foo) = "bar"] } The value of this option is then visible via the message's Descriptor: const FieldDescriptor* field = MyMessage::descriptor()->FindFieldByName("some_field"); assert(field->options().GetExtension(foo) == "bar"); This feature has been implemented and tested in C++ and Java. Other languages may or may not need to do extra work to support custom options, depending on how they construct descriptors. C++ * Fixed some GCC warnings that only occur when using -pedantic. * Improved static initialization code, making ordering more predictable among other things. * TextFormat will no longer accept messages which contain multiple instances of a singular field. Previously, the latter instance would overwrite the former. * Now works on systems that don't have hash_map. Python * Strings now use the "unicode" type rather than the "str" type. String fields may still be assigned ASCII "str" values; they will automatically be converted. * Adding a property to an object representing a repeated field now raises an exception. For example: # No longer works (and never should have). message.some_repeated_field.foo = 1
* Integrate recent changes from google3.Gravatar temporal2008-08-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | protoc - New flags --encode and --decode can be used to convert between protobuf text format and binary format from the command-line. - New flag --descriptor_set_out can be used to write FileDescriptorProtos for all parsed files directly into a single output file. This is particularly useful if you wish to parse .proto files from programs written in languages other than C++: just run protoc as a background process and have it output a FileDescriptorList, then parse that natively. C++ - Reflection objects are now per-class rather than per-instance. To make this possible, the Reflection interface had to be changed such that all methods take the Message instance as a parameter. This change improves performance significantly in memory-bandwidth-limited use cases, since it makes the message objects smaller. Note that source-incompatible interface changes like this will not be made again after the library leaves beta. Python - MergeFrom(message) and CopyFrom(message) are now implemented. - SerializeToString() raises an exception if the message is missing required fields. - Code organization improvements. - Fixed doc comments for RpcController and RpcChannel, which had somehow been swapped.
* Initial checkin.Gravatar temporal2008-07-10