aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/compiler/cpp/cpp_file.cc
Commit message (Collapse)AuthorAge
* Fix freebsd build.Gravatar Feng Xiao2017-03-14
| | | | | | | | It turns out system headers included by generated plugin.pb.h file already contains major/minor macro definitions when built on FreeBSD and we need to add #undefs to the generated header file. This change also fixes another compile error regarding EXPECT_DEATH on FreeBSD.
* 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
* Init index_in_metadata_ without conditionGravatar Julien Brianceau2016-12-21
| | | | | | Chromium MemorySanitizer (MSan) reports use-of-uninitialized-value of index_in_metadata_ attribute from EnumGenerator class. Fix these warnings by initializing these attributes without condition.
* C++: export _xxx_default_instance_ symbolsGravatar Julien Brianceau2016-12-08
| | | | | _xxx_default_instance_ symbols are used in inline functions. We have to export them to avoid undefined reference link errors.
* Merge pull request #2403 from google/down-integrate-with-msvc-fixGravatar Adam Cozzette2016-11-23
|\ | | | | Integrated internal changes from Google
* | C++: Fix use with GOOGLE_PROTOBUF_NO_STATIC_INITIALIZERGravatar Julien Brianceau2016-11-21
| | | | | | | | | | | | | | Behavior of define GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER has been altered between 337a028 and cc8ca5b for C++. See github issue #2385 for further details.
| * 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
|
* Down integrate from Google internal.Gravatar Jisi Liu2016-04-28
|
* Integrate google internal changes.Gravatar Jisi Liu2016-03-30
|
* Down-integrate from internal code base.Gravatar Feng Xiao2015-12-11
|
* Use angle bracket for well known type proto header.Gravatar Bo Yang2015-12-08
|
* Change the #include for any.h to use angle brackets instead of quotes, to be ↵Gravatar Matthew Wu2015-10-22
| | | | consistent with other protobuf library includes.
* Don't assume char is signed.Gravatar Brian Silverman2015-09-08
| | | | | It isn't always, which causes problems when trying to put negative values into the array with C++11.
* Down-integrate from google3.Gravatar Feng Xiao2015-08-22
|
* Workaround for MSVC's string literal compiler limit.Gravatar Qartar2015-06-12
| | | | | | | | | | Escape characters don't count for string literal size, no need to pre-generate escape string. Added unit test to touch enormous cpp generated descriptor. Updated makefile to include enormous_descriptor.proto Fixed language compatibility error.
* 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
* Merge pull request #84 from tseaver/fix_80-avoid_INT32_MAX_MINGravatar Feng Xiao2014-11-17
|\ | | | | Don't rely on non-standard 'INT32_MAX' / 'INT32_MIN'.
| * Use 'kint32min'/'kint32max' constants, rather than defining locally.Gravatar Tres Seaver2014-11-17
| | | | | | | | | | Incorporates feedback from @xfxyjwf: https://github.com/google/protobuf/pull/84#discussion_r20474781.
| * Don't rely on non-standard 'INT32_MAX' / 'INT32_MIN'.Gravatar Tres Seaver2014-11-17
| | | | | | | | | | | | Define safe constants to use when padding enums. Fixes #80.
* | 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
* down integrate to svnGravatar jieluo@google.com2014-07-18
|
* Fix a typo.Gravatar xiaofeng@google.com2013-07-30
|
* Generate missing inclusion of common.h.Gravatar pliard@google.com2012-10-02
| | | | | | | | | | | FileGenerator::GenerateBuildDescriptors() emits "::google::protobuf::internal::OnShutdown(&$shutdownfilename$);" which is declared in common.h. Although Protobuf is very well tested a compilation error was triggered while rolling Protobuf r423:426. There might be something wrong in the Chromium roll (still in progress). It seems safer anyway not to rely on indirect headers inclusion.
* Down-integrate from internal branchGravatar xiaofeng@google.com2012-09-22
|
* Update outdated use of GoogleOnceType.Gravatar pliard@google.com2012-05-10
|
* Don't call AddDesc() at static init time in LITE_RUNTIME mode.Gravatar pliard@google.com2012-05-04
| | | | | | | | | | | | | | | This patch makes the generation of StaticDescriptorInitializer_$filename$ depend on whether LITE_RUNTIME is enabled. Note that this works only when extensions are not used. This lets us significantly decrease the number of static initializers generated by protoc in LITE_RUNTIME mode (used in Chromium). In LITE_RUNTIME mode, $adddescriptorsname$() is called the first time that default_instance() is called (rather than being called during static init). To benefit from this patch in LITE_RUNTIME mode without extensions, compile with -DGOOGLE_PROTOBUF_NO_STATIC_INIT. BUG=351
* Escape C++ Trigraphs.Gravatar liujisi@google.com2010-12-21
|
* Submit recent changes from internal branch. See CHANGES.txt for more details.Gravatar liujisi@google.com2010-11-02
|
* Fix issue 162: generated code should #include <algorithm> for std::swap().Gravatar kenton@google.com2010-02-01
|
* Massive roll-up of changes. See CHANGES.txt.Gravatar kenton@google.com2009-12-18
|
* Submit recent changes from internal branch, including "lite mode" forGravatar kenton@google.com2009-07-29
| | | | | C++ and Java. See CHANGES.txt for more details.
* Provide ShutdownProtobufLibrary() which frees all startup-allocated objects.Gravatar kenton@google.com2009-05-06
|
* Integrate recent changes from Google-internal code tree. See CHANGES.txtGravatar kenton@google.com2009-04-25
| | | | | for details.
* * Fix build on MSVC.Gravatar kenton@google.com2008-09-30
| | | | | * Switch to statically-linked libraries instead of DLLs on MSVC.
* 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