Commit Graph

7063 Commits

Author SHA1 Message Date
Juraj Lutter
982222e71a Include cmath instead of math.h
This fixes build on, at least, NetBSD 8.1 with gcc 5.5 and SmartOS with gcc 7.
2019-10-15 12:03:08 -07:00
Rafi Kamal
3a505c2ded
Merge pull request #6744 from elharo/patch-5
Java: Update to Guava 28.1-android
2019-10-15 09:00:06 -07:00
Rafi Kamal
e249134eb8
Merge pull request #6756 from haberman/ruby-empty-names
Fixed bug in Ruby DSL when no names are defined in a file.
2019-10-14 10:55:00 -07:00
Rafi Kamal
bf36d04348
Merge pull request #6757 from haberman/ruby-empty-names-release
Ported names fix for Ruby to the release branch.
2019-10-13 22:24:38 -07:00
Sydney Acksman
f50bc62feb Add length checks to ExtensionCollection 2019-10-11 20:23:07 -05:00
Alan Wu
c1ba7c643c Remove unused argument to avoid UB
`OneOfDescriptor_each` is registered as a Ruby method which takes zero
parameters, which means it should take one argument.

When Ruby invokes `OneOfDescriptor_each`, it calls it with one parameter
only, which is one less than what `OneOfDescriptor_each` takes before
this commit. Calling a function with the wrong number of argument is
technically undefined behavior.

See also: §6.5.2.2, N1256
2019-10-11 20:32:35 -04:00
Joshua Haberman
35da84bf64 Ported names fix for Ruby to the release branch. 2019-10-11 14:52:08 -07:00
Joshua Haberman
09a8639482 Fixed bug in Ruby DSL when no names are defined in a file. 2019-10-11 14:22:34 -07:00
Rafi Kamal
27c1defe35
Merge branch 'master' into 201910111201 2019-10-11 12:07:38 -07:00
Rafi Kamal
6c92f9dff1 Down integrate to GitHub 2019-10-11 12:05:46 -07:00
Rafi Kamal
d8e678aae4
Merge pull request #6728 from protocolbuffers/3.10.x-merge
Merge 3.10.x with master and increment the version number
2019-10-10 16:56:19 -07:00
Paul Yang
2dec82e1e0
Fix conformance test (#6750)
* Fix conformance test

Default value of string/message map is not encoded

* Fix zts build
2019-10-10 16:03:52 -07:00
Elliotte Rusty Harold
e7db3d35e4
Update to Guava 28.1-android 2019-10-08 15:44:46 -04:00
Rafi Kamal
7efcc0466c
Change Protobuf BOM license from Apache to BSD 2019-10-07 15:11:37 -07:00
Ricky Pai
e0441b2f28 export third_party BUILD files so they are accessible to users 2019-10-04 08:39:15 -07:00
Benjamin Peterson
5c11b41250 Improve the grammar of the unused import message. 2019-10-04 08:37:29 -07:00
Rafi Kamal
000a8d0902 Removed unnecessary conflict files 2019-10-03 14:38:13 -07:00
Rafi Kamal
2ed41359fe Update version to 3.11.0-RC0 2019-10-03 14:24:27 -07:00
Rafi Kamal
97c7c3fc97 Merge 3.10.x to master 2019-10-03 14:03:38 -07:00
Rafi Kamal
6d4e7fd796
Merge pull request #6721 from protocolbuffers/rafi-kamal-patch-1
Update CHANGES.txt with changes since 3.10.0-RC1
2019-10-02 17:17:27 -07:00
Rafi Kamal
1a57c13086
Update CHANGES.txt with changes since 3.10.0-RC1 2019-10-02 17:06:22 -07:00
Paul Yang
f50204dab4
Initialize well known type values (#6713) (#6714)
* Initialize well known type values

Also fixes #6667

* Revert unwanted change
2019-09-30 15:53:30 -07:00
Paul Yang
a32c2d0306
Initialize well known type values (#6713)
* Initialize well known type values

Also fixes #6667

* Revert unwanted change
2019-09-30 14:43:03 -07:00
Adam Cozzette
f4ceaecf68 Updated deprecation macros to annotate deprecated code 2019-09-30 14:29:24 -07:00
EFanZh
0d1d92d339 Revert "Update signatures of UTF-8 string functions to accept size_t type sizes"
This reverts commit 911e3040fa.
2019-09-30 09:28:27 -07:00
EFanZh
00325ed97b Update signatures of UTF-8 string functions to accept size_t type sizes 2019-09-30 09:28:27 -07:00
EFanZh
a4301ca6eb Cast size_t type to int type explicitly
Currently, the generated header file might cause warnings if user specifies `-Wconversion` compiler option. This commit should be able to fix it.
2019-09-30 09:28:27 -07:00
Nikhil Pothuru
11a5b035da Update README.md (#6708)
* Update README.md

Fixed spelling error

* Update README.md
2019-09-29 19:49:17 -07:00
Andrei-Florin BENCSIK
97b18021f6 Remove unused function and add more UTs
When browsing around the strutil files I found a function
that was never referenced inside the code base
"void StripString(string* s, const char* remove,
-                                 char replacewith);"

The name was kind of misleading as well and it seems like
it's a carbon copy of
"void ReplaceCharacters(string* s, const char* remove,
                                       char replacewith);"
(even the parameter names are the same, the code is the same..)

Is it intentional? Maybe for compatibility reasons? If so,
let's make it deprecated and use the ReplaceCharacters method inside
or the other way around.

Also, noticed there were no tests for "StripString" or "Replace".
Added some for both and planning on maybe making it more C++ish (?)
in another commit.
2019-09-27 16:08:58 -07:00
Changming Sun
95a1c4fbc4 Fix #6098 2019-09-27 15:44:33 -07:00
Sigurd Meldgaard
f4a3e06101 Add option for dart 2019-09-27 14:41:42 -07:00
Paul Yang
66bae588dd
Add document for php development (#6694)
* Add document for php development

* Fix comments
2019-09-26 13:04:07 -07:00
Rafi Kamal
9a0c848108
Merge pull request #6701 from elharo/patch-4
Update Java Readme to 3.9.2
2019-09-26 11:38:43 -07:00
Elliotte Rusty Harold
e157c5b9be
Update to 3.9.2
3.9.2 is on the Githib releases page.
2019-09-26 13:14:38 -04:00
Paul Yang
3f323c5b99
Fix incorrect leap day for Timestamp in php (#6696) 2019-09-24 18:26:02 -07:00
Joshua Haberman
61b6670a2a Fixed leap year handling by reworking upb_mktime() -> upb_timegm(). (#6695)
The new function name also better reflects the semantics of the
function.  Like timegm(), this function always converts to/from
UTC, not local time.
2019-09-24 17:10:24 -07:00
Christian Maurer
b9f405ae46 Removed unused-parameter warning 2019-09-20 15:14:48 -07:00
Paul Yang
3a0be889c2
Merge pull request #6681 from thomasvl/objc_fix2
Pull the ObjC fixes from #6679 to the 3.10.x branch
2019-09-20 13:58:12 -07:00
dmaclach
397e017c80 Remove OSReadLittle* due to alignment requirements (#6678)
The OSReadLittleInt64 function as defined by Apple reduces down to:

`return *(volatile uint64_t *)((uintptr_t)base + byteOffset);`

which means we are type-punning using a cast. On ARMv7 and other aligned architectures this can cause crashes. 
Minimal example: https://gist.github.com/dmaclach/b10b0a71ae614d304c067cb9bd264336

Fixes #6679
2019-09-20 15:56:28 -04:00
Thomas Van Lenten
33da4715ea [ObjC] Don't use unions and instead use memcpy for the type swaps. (#6672)
The code in question hasn't change in a long time so the cause of
https://github.com/firebase/firebase-ios-sdk/issues/3851 still appears to be
an Xcode 11 clang change/bug; but this does appear to be slightly better
code for the work being done.

Cleanup along the way for #6679
2019-09-20 15:56:26 -04:00
dmaclach
4702ba9043 Remove OSReadLittle* due to alignment requirements (#6678)
The OSReadLittleInt64 function as defined by Apple reduces down to:

`return *(volatile uint64_t *)((uintptr_t)base + byteOffset);`

which means we are type-punning using a cast. On ARMv7 and other aligned architectures this can cause crashes. 
Minimal example: https://gist.github.com/dmaclach/b10b0a71ae614d304c067cb9bd264336

Fixes #6679
2019-09-20 11:19:45 -04:00
Thomas Van Lenten
5846439713
[ObjC] Don't use unions and instead use memcpy for the type swaps. (#6672)
The code in question hasn't change in a long time so the cause of
https://github.com/firebase/firebase-ios-sdk/issues/3851 still appears to be
an Xcode 11 clang change/bug; but this does appear to be slightly better
code for the work being done.

Cleanup along the way for #6679
2019-09-20 10:52:34 -04:00
Jan Tattermusch
378231756f
Merge pull request #6669 from ObsidianMinor/csharp/fix-comments
Fix incorrect Proto2 C# doc comments
2019-09-19 14:49:06 +02:00
Sydney Acksman
c54ff8d0dc Fix many proto2 C# doc comments 2019-09-19 04:39:40 -05:00
Rafi Kamal
33151f2c87
Merge pull request #6647 from rafi-kamal/3.10.x-201909121347
Update protobuf version to 3.10.0 stable
2019-09-18 15:32:09 -07:00
Jie Luo
2a4657971d
Update to 3.10.0-rc0 (#6660)
* Cherry pick changes on update_version.py #6643

* Update version to 3.10.0-rc-0

* Do not add rc0 to php packages.xml
2019-09-18 13:30:03 -07:00
Joshua Haberman
a77412892c
Merge pull request #6656 from m0hamed/fix_export
Simplify template exporting macros
2019-09-17 15:55:22 -07:00
Paul Yang
2610eb6675
Add license (#6651) 2019-09-16 15:35:53 -07:00
Mohamed Heikal
4d034fecfc Simplify template exporting macros 2019-09-16 15:38:57 -04:00
Rafi Kamal
5021cd3419 Update protobuf version 2019-09-12 13:50:24 -07:00