Commit Graph

2643 Commits

Author SHA1 Message Date
Feng Xiao
fb0af6d02e Merge pull request #768 from pkasting/time
Delete kNanosPerSecond from time.cc.
2015-08-28 10:28:44 -07:00
Feng Xiao
47210ccd77 Merge pull request #746 from zmodem/fix_predict_macros2
Fix the no-op definitions of GOOGLE_PREDICT_{TRUE,FALSE}
2015-08-27 15:52:07 -07:00
Feng Xiao
59b360f651 Merge pull request #767 from pkasting/port
Avoid #including system headers from inside a namespace.
2015-08-27 15:51:06 -07:00
Peter Kasting
d680159527 Delete kNanosPerSecond from time.cc.
This variable is unused, and thus triggers a build warning on MSVC.
2015-08-27 14:19:51 -07:00
Peter Kasting
2e789bc246 Avoid #including system headers from inside a namespace.
port.h #includes various headers in order to define byteswap functions, but it
currently does so from inside the google::protobuf namespace.  This can cause
bizarre symbol conflicts and other build errors as these headers' contents are
then included inside this namespace.

Instead, #include the relevant headers above the namespace declarations.
2015-08-27 14:16:10 -07:00
Joshua Haberman
c7a1f8ec3b Merge pull request #728 from dano/py3_str_compat
Get all tests passing on Python3 (except Python3.4 cpp implementation)
2015-08-26 15:44:06 -07:00
Feng Xiao
b00595a3a9 Merge pull request #709 from xfxyjwf/map_bug
Fix JSON map fields parsing.
2015-08-26 13:18:04 -07:00
Hans Wennborg
fcf1b57579 Fix the no-op definitions of GOOGLE_PREDICT_{TRUE,FALSE}
Updating to the current protobuf version caused the following build errors in
Chromium when using Clang on Windows:

..\..\third_party\protobuf\src\google/protobuf/stubs/fastmem.h(67,43) :  error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
  if (GOOGLE_PREDICT_FALSE(n_rounded_down == 0)) {  // n <= 7
                           ~~~~~~~~~~~~~~~^~~~

The problem is that on Windows, GOOGLE_PREDICT_FALSE is #defined to nothing, so
the code expands to 'if ((n_rounded_down == 0))', which Clang warns about.

Clang would not have warned if the extra parentheses came from the macro,
but in this case they don't because the macro is just dropped.

Fix this by making the macros behave as an identity function instead of just
getting dropped.

This is closer to what these macros look like in stubs/port.h internally.
2015-08-26 11:32:08 -07:00
Jon Skeet
f6b05f78a4 Merge pull request #739 from jtattermusch/include_descriptor_proto_master
include descriptor.proto in nuget package
2015-08-26 06:44:04 +01:00
Jan Tattermusch
72145dffd8 include descriptor.proto in nuget package 2015-08-25 18:46:59 -07:00
Feng Xiao
cf94f7b744 Merge pull request #726 from DouglasHeriot/msvc-noinline
Define GOOGLE_ATTRIBUTE_NOINLINE for MSVC. Workaround for VS2015 Release build compiler bug
2015-08-25 18:16:02 -07:00
Jon Skeet
f9aed2088d Merge pull request #732 from jskeet/fix-descriptor-proto
Change where we rename Descriptor.cs to DescriptorProtoFile.cs.
2015-08-25 17:51:40 +01:00
Jon Skeet
31d119af22 Remove extraneous TODO 2015-08-25 17:51:17 +01:00
Jon Skeet
ca89a1a118 Change where we rename Descriptor.cs to DescriptorProtoFile.cs.
We now do this in protoc instead of the generation simpler.

Benefits:
- Generation script is simpler
- Detection is simpler as we now only need to care about one filename
- The embedded descriptor knows itself as "google/protobuf/descriptor.proto" avoiding dependency issues

This PR also makes the "invalid dependency" exception clearer in terms of expected and actual dependencies.
2015-08-25 14:32:28 +01:00
Joshua Haberman
3253634dcb Merge pull request #711 from tamird/python3-prep
Remove Python 2.5 cruft
2015-08-22 11:51:01 -07:00
Dan O'Reilly
38eef02aab Fix metaclass issue on Python 3. Get text handling tests passing on Python 3.
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
2015-08-22 13:07:12 -04:00
Dan O'Reilly
fc80874adf Start work on getting text handled properly on PY3 2015-08-22 13:07:12 -04:00
Tamir Duberstein
87993d7507 assertEquals is deprecated 2015-08-22 13:06:24 -04:00
Tamir Duberstein
821fcb2ded Use assertIsInstance 2015-08-22 12:56:34 -04:00
Tamir Duberstein
09831c8768 Clean up exception syntax 2015-08-22 12:55:19 -04:00
Tamir Duberstein
322d8939fc Remove Python 2.5 cruft 2015-08-22 12:54:31 -04:00
Joshua Haberman
3ff5625231 Merge pull request #722 from dano/py2_py3_straddle
Add tox, Python 2.6 compatibility, and many Python 3 compatibility fixes
2015-08-22 09:49:01 -07:00
Dan O'Reilly
46969b99ca Set DYLD_LIBRARY_PATH for OSX
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
2015-08-21 19:28:18 -04:00
Dan O'Reilly
76f8a3fbcd Travis now only tests Python2.6 on Linux.
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
2015-08-21 18:51:56 -04:00
Douglas Heriot
5021c4d885 Define GOOGLE_ATTRIBUTE_NOINLINE for MSVC. Workaround for VS2015 Release 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?
2015-08-22 02:05:40 +10:00
Joshua Haberman
eb65c69e14 Merge pull request #584 from haberman/cwarnings
Ruby: Conform to C89/C90 variable declaration rules.
2015-08-21 09:00:40 -07:00
Dan O'Reilly
3791c8051a Fix travis build
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
2015-08-20 20:49:45 -04:00
Josh Haberman
d61e6adfcc Return TypedData_Wrap_Struct directly.
Change-Id: I6cf77f01370204ad4bc7b345a040a9a3de1706a0
2015-08-20 16:41:32 -07:00
Dan O'Reilly
5de2a81b01 Improve tox.ini, install py26 for travis.
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
2015-08-20 18:19:56 -04:00
Dan O'Reilly
afa488c4d1 Remove debug code
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
2015-08-20 15:51:06 -04:00
Dan O'Reilly
5029c7b7d3 Install tox during travis build.
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
2015-08-20 15:45:53 -04:00
Dan O'Reilly
4a0129f680 Remove ez_setup.py from Makefile.am
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
2015-08-20 15:33:01 -04:00
Dan O'Reilly
416f001adc Use tox in travis build. Tweak tox.ini
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
2015-08-20 15:29:10 -04:00
Dan O'Reilly
de22561b7b Merge branch 'py2_py3_straddle' of github.com:dano/protobuf into py2_py3_straddle 2015-08-20 13:57:03 -04:00
Dan O'Reilly
3bdfb4b695 Add some clarifying comments. Remove ez_setup.py.
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
2015-08-20 13:52:19 -04:00
Dan O'Reilly
4fefc07ec5 Fix duplicate entry in .gitignore
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
2015-08-18 11:31:37 -04:00
Dan O'Reilly
9d689692d3 Make testing cpp implementation optional
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
2015-08-16 13:56:25 -04:00
Dan O'Reilly
3083d8cee7 Fix --cpp_implementation test failure. Test both pure Python and cpp implementation in tox.
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
2015-08-15 10:07:38 -04:00
Dan O'Reilly
7601551f7c Just always uses BytseIO in text_format for now
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
2015-08-14 23:22:47 -04:00
Dan O'Reilly
893b65e469 Merge remote-tracking branch 'upstream/master' into py2_py3_straddle 2015-08-14 23:09:58 -04:00
Dan O'Reilly
7013a75b90 Disable py3* in tox
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
2015-08-14 23:09:29 -04:00
Dan O'Reilly
2621c8aefb Get Python 2.6 working.
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
2015-08-14 22:54:53 -04:00
Jon Skeet
0cb84ee31f Merge pull request #720 from jtattermusch/csharp_fixes
C# fix for TypeInitializer exception.
2015-08-14 22:12:02 +01:00
Jan Tattermusch
fa2fe35dec fix type initialization problem with FileDescriptor 2015-08-14 13:38:34 -07:00
Jan Tattermusch
143688f68b add a failing descriptor test 2015-08-14 13:23:44 -07:00
Jan Tattermusch
a55a4449ef remove duplicate test case 2015-08-14 13:16:04 -07:00
Dan O'Reilly
d06adbd4a4 Fix usage of assertItemsEqual on Py3
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
2015-08-14 16:16:00 -04:00
Dan O'Reilly
3d5aa6aef9 Fix some more Python 3 compat issues
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
2015-08-14 16:12:34 -04:00
Paul Yang
5c370cc55f Merge pull request #571 from thomasvl/validation_support
Add support for a file listing expected package to objc prefixes for validation.
2015-08-14 13:06:43 -07:00
Dan O'Reilly
fe7d9379df Fixing some long/int bugs
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
2015-08-14 15:26:33 -04:00