The valueOf method on enums is deprecated, but for compatibility reasons
the generated code has to keep using it. We can use an annotation to
suppress the deprecation warnings.
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.
This fixes the following build error:
oldpwd=`pwd` && cd .../protobuf/src && \
$oldpwd/js_embed google/protobuf/compiler/js/well_known_types/any.js google/protobuf/compiler/js/well_known_types/struct.js google/protobuf/compiler/js/well_known_types/timestamp.js > $oldpwd/google/protobuf/compiler/js/well_known_types_embed.cc
/bin/bash: line 1: .../protobuf/target/src/google/protobuf/compiler/js/well_known_types_embed.cc: No such file or directory
Makefile:8201: recipe for target 'google/protobuf/compiler/js/well_known_types_embed.cc' failed
which is observed during the cross-compilation since the version 3.2.
If the test cannot find a temp directory by
checking environment variables, it will fall back
to using the current working directory as the temp
directory root.
This is what the test used to do as of commit
6de51caed5
and what was then changed by commit
792d098769
Do not use "googletest.h", apprently that leads to
linking errors on Windows which I couldn't figure
out how to solve, and decided to just go with
plain gTest instead.
See https://github.com/google/protobuf/issues/3951
unittest_proto3 had been changed in a very backward-incompatible
way which was never going to work with C# as it imports proto2 messages.
This is now a copy of the old file, but with a package name change for
compatibility with the remaining files in src/google/protobuf.
The other moves are for files that are only used by C#.
- Removed the redefination in the atomicword_compat.h. Now Atomic32 will
alwyas be intptr_t in 32bit platforms, the bridge is no longer needed.
- Change NaCl 64bit to use intptr_t instead of int32 for Atomic32,
otherwise AtmoicWord APIs will miss the definations.
After this change, the AtmoicWord will always be either Atomic32 or
Atmoic64 depending on the platforms.
If messages A and B have the same oneof case, which is a message
type, and we merge B into A, those sub-messages should be merged.
Fixes#3200.
Note that I haven't regenerated all the code, as some of the protos
have been changed, breaking generation.
* Reserve unknown in ruby
* Revert ruby tests. Wait for cpp impl for conformance test
* Add conformance test for preserving unknown
* Add unknown field conformance test to csharp failure list.
* Fix comments
* Fix comment
* Fix comments
* Fix typo
* Use stringsink_string directly
* Mark hd unused
* Remove unused encodeunknown_handlerfunc
* Use constexpr more with VC++ 2017
Chrome's official builds have over 170 dynamic initializers for
variables of the form *::TableStruct::aux. Defining
PROTOBUF_CONSTEXPR_VAR to be constexpr for VS 2017 gets rid of all of
these and saves about 10 KB of binary size.
* Update generated_message_table_driven.h
Restore accidentally deleted line.