Commit Graph

1066 Commits

Author SHA1 Message Date
Julien Brianceau
3316062e98 Fix #include in js_generator.cc
Reland commit f2885f6 that has been trampled by commit d64a2d99.
2016-11-14 22:13:16 +01:00
Chris Kennelly
e02cb2bb83 Resolve old TODO for StringTypeHandler.
StringSpaceUsedExcludingSelf has been part of the lite library since
b913cbd.
2016-11-11 16:10:41 -08:00
Feng Xiao
8a4b2c573a Merge pull request #2353 from guptasu/master
MessageOptions should handle both proto2 and google.protobuf package names.
2016-11-11 12:31:52 -08:00
Feng Xiao
9f75c5aa85 Merge pull request #2337 from sergiocampama/deprecation
Fixes deprecation warnings/errors on Xcode
2016-11-10 10:48:51 -08:00
guptasu
fce8b6b924 Made helper code also consider package name 'proto2' when dealing with MessageOptions.
This is done so that the same library can be used irrespective of whether MessageOptions belong to package name 'proto2' or 'google.protobuf'
2016-11-10 10:23:00 -08:00
Sergio Campama
e75cf40e8f Fixing references to the removed atomicops_internals_pnacl.h file. 2016-11-10 10:20:07 -05:00
Sergio Campama
ecc460ab1b Renamed the pnacl version of atomicops.h into C11 atomic, and flagged the mac version to that if atomic is enabled 2016-11-07 15:43:12 -05:00
Rodrigo Hernandez
975d577a2b Added explicit cast to avoid size warning on Win64. 2016-11-04 14:52:54 -06:00
Adam Cozzette
8785004c80 Fix unused parameter warnings in arena_free
The size parameter is only used in cases where the compiler supports
sized delete, so when that's not available we need to specifically cast
it to void to prevent a warning.
2016-11-04 10:01:16 -07:00
Feng Xiao
7bd11fcb59 Merge pull request #2301 from jbrianceau/arm-atomic-kuser-helpers-fix-v2
[arm/gcc] Don't rely on KUSER_HELPERS feature for atomics
2016-11-03 16:59:25 -07:00
Jisi Liu
93a4fa23d0 Merge pull request #2302 from jbrianceau/generic-gcc-atomics-strong-cmpxchg
generic atomicops: Use strong compare_exchange
2016-11-02 15:03:19 -07:00
Michael Avrukin
4d813de095 Fix compiler warnings when running :protobuf_test
When running >bazel test :protobuf_test a few compiler warnings came up.  They were centered around the usage of "int" as the loop counter where the value should have been a size_t.
2016-11-02 16:12:07 +02:00
Julien Brianceau
a5a2c1d78f generic atomicops: Use strong compare_exchange
Weak compare-and-exchange are allowed to fail spuriously, so we have
to use the strong variation here.
2016-10-28 14:27:03 +02:00
Julien Brianceau
4587a3fd07 [arm/gcc] Don't rely on KUSER_HELPERS feature for atomics
ARM specific CONFIG_KUSER_HELPERS feature can be disabled in Linux kernel,
and in this case, we shouldn't crash. Use gcc built-in functions instead
of arm specific code if they are available.
2016-10-28 14:02:41 +02:00
ramrunner
bfc1299a09 define no_threadlocal on OpenBSD 2016-10-26 17:05:56 -06:00
Jisi Liu
2e314a697a Add comments about converting directives into PluginName 2016-10-26 13:40:36 -07:00
Jisi Liu
59cd5d0e26 Support extra parameters for plugins. 2016-10-25 17:43:59 -07:00
Bo Yang
686a19c9b7 Merge 3.1.x into master. 2016-10-13 14:25:43 -07:00
Feng Xiao
0321baf9e8 Merge pull request #2203 from mrry/msvc_fix
Fix MSVC build when HAVE_LONG_LONG is defined.
2016-10-11 10:28:05 -07:00
Adam Cozzette
70477613b9 Do strict enum name checking only for proto3
There seem to already be .proto files out there that have conflicting
enum names, which will not be able to build successfully for some
languages (like C#). To prevent this problem from spreading, let's make
it an error for proto3 but just issue a warning for proto2. This fixes
issue #2179.
2016-10-10 11:44:54 -07:00
Adam Cozzette
4a4a1627c1 Fixed references to foreign nested messages with CommonJS-style imports
A bug was causing generated JSPB code with CommonJS-style imports to
refer incorrectly to nested messages from other .proto files. The
generated code would have things like "test_pb.InnerMessage" instead of
"test_pb.OuterMessage.InnerMessage". This commit fixes the problem by
correctly taking into account any message nesting.
2016-10-10 11:44:21 -07:00
Feng Xiao
ae9455c274 Fix MSVC stack overflow issue. 2016-10-10 11:44:21 -07:00
Feng Xiao
39685f67d7 Fix VS test failures. 2016-10-10 11:44:21 -07:00
Feng Xiao
9e260a323b Reduce test length to avoid stack overflow on VS. 2016-10-10 11:44:21 -07:00
Feng Xiao
460e7dd7c4 Fix Visual Studio compile issues.
Change-Id: I6a5078b6bcdf4637e11c1cb9da1f74298e6fc26e
2016-10-10 11:44:21 -07:00
Jisi Liu
4cf072248f Fix default instance destructor 2016-10-10 11:44:21 -07:00
Bo Yang
0c7852526b Bump library version to 11 2016-10-10 11:44:21 -07:00
Bo Yang
e62d1f13f2 Add back removed descriptor field. 2016-10-10 11:44:21 -07:00
Adam Cozzette
f7bb8477a8 Fixed quadratic behavior in JSPB deserialization of repeated fields (#2117) (#2146)
Currently deserialization of a non-packed binary repeated field is quadratic in
the number of elements, because each time we parse a new element we copy over
all elements we have parsed so far. This CL fixes the performance problem by
having the generated deserialization code just call addX() instead of using
getX() and setX().
2016-10-10 11:43:48 -07:00
Bo Yang
93007e15ff Bump library veriosn to 3.1 2016-10-10 11:43:48 -07:00
Bo Yang
fe1aaad7fe Fix bugs for internal integration. 2016-10-10 11:39:55 -07:00
Bo Yang
e3f0689d05 Fix bugs for internal integration. 2016-10-10 11:23:36 -07:00
Bo Yang
cc8ca5b6a5 Integrate internal changes 2016-10-10 11:23:36 -07:00
Andy Hochhaus
b2b65842ea Silence compile warnings in bazel 2016-10-09 08:36:01 -07:00
Adam Cozzette
71e5994b1a Merge pull request #2193 from acozzette/common-js-fix
Fixed references to foreign nested messages with CommonJS-style imports
2016-10-04 13:14:12 -07:00
Adam Cozzette
149659b72a Do strict enum name checking only for proto3
There seem to already be .proto files out there that have conflicting
enum names, which will not be able to build successfully for some
languages (like C#). To prevent this problem from spreading, let's make
it an error for proto3 but just issue a warning for proto2. This fixes
issue #2179.
2016-10-04 07:19:54 -07:00
Derek Murray
1d2c7b6c73 Fix MSVC build when HAVE_LONG_LONG is defined. 2016-09-29 12:52:54 -07:00
Adam Cozzette
c4d70123ac Fixed references to foreign nested messages with CommonJS-style imports
A bug was causing generated JSPB code with CommonJS-style imports to
refer incorrectly to nested messages from other .proto files. The
generated code would have things like "test_pb.InnerMessage" instead of
"test_pb.OuterMessage.InnerMessage". This commit fixes the problem by
correctly taking into account any message nesting.
2016-09-27 17:25:00 -07:00
Jisi Liu
3f59452448 Merge pull request #2192 from google/3.0.x
Merge 3.0.x into master.
2016-09-27 14:19:30 -07:00
Feng Xiao
4d3e4cfa4a Fix MSVC stack overflow issue. 2016-09-23 23:53:43 -07:00
Feng Xiao
3c88e1b53d Fix VS test failures. 2016-09-23 16:53:01 -07:00
Feng Xiao
f6b4d188b4 Reduce test length to avoid stack overflow on VS. 2016-09-23 21:45:03 +00:00
Feng Xiao
0798d91f55 Fix Visual Studio compile issues.
Change-Id: I6a5078b6bcdf4637e11c1cb9da1f74298e6fc26e
2016-09-23 11:55:26 -07:00
Jisi Liu
f184cb6035 Fix default instance destructor 2016-09-23 11:17:00 -07:00
Bo Yang
94bbeb4681 Bump library version to 11 2016-09-22 18:10:00 -07:00
Bo Yang
1b7a844fa1 Add back removed descriptor field. 2016-09-22 18:04:02 -07:00
Adam Cozzette
f81d44fafa Fixed quadratic behavior in JSPB deserialization of repeated fields (#2117) (#2146)
Currently deserialization of a non-packed binary repeated field is quadratic in
the number of elements, because each time we parse a new element we copy over
all elements we have parsed so far. This CL fixes the performance problem by
having the generated deserialization code just call addX() instead of using
getX() and setX().
2016-09-21 10:39:23 -07:00
Sergio Campama
1af7c4cb08 Fixes static analyzer issues from xcode. 2016-09-20 17:59:27 -07:00
Bo Yang
08e9f7011b Bump library veriosn to 3.1 2016-09-21 00:38:58 +00:00
Bo Yang
22d7248c97 Fix bugs for internal integration. 2016-09-20 23:54:13 +00:00