Commit Graph

839 Commits

Author SHA1 Message Date
murgatroid99
a862b6b77f Fix CommonJS relative require generation, and test it 2016-02-24 13:44:57 -08:00
Feng Xiao
513a8a69df Merge pull request #804 from bsilver8192/master
Add atomics support for 32-bit PPC.
2016-02-22 09:27:27 -08:00
Joshua Haberman
32daf513ce Merge pull request #1215 from haberman/commonjs
Added support for CommonJS require()
2016-02-19 14:39:17 -08:00
Thomas Van Lenten
2480acb6d9 Support ObjC Generic Collections
- Extend GPB*ObjectDictionary to support generic syntax.
- Update the generator to output generics so the enclosed type is exposed for compiler checks.
- Use generics in a the public interfaces.
- Update the generated sources that are checked in.
2016-02-18 13:55:59 -05:00
Josh Haberman
35298f9779 Fixed definition of extensions, and added CommonJS tests to Travis. 2016-02-18 10:30:21 -08:00
Josh Haberman
77af5d04b1 Fixed nested message scopes for CommonJS. 2016-02-18 10:30:21 -08:00
Josh Haberman
e9f31ee3d7 CommonJS tests are now passing. 2016-02-18 10:30:21 -08:00
Josh Haberman
55cc3aa987 WIP. 2016-02-18 10:30:21 -08:00
Joshua Haberman
d41db75dcb Merge pull request #260 from ejsd1989/issue-#242
Removes redundant null pointer checks checks
2016-02-16 16:47:46 -08:00
Joshua Haberman
3ee2e20539 Merge pull request #1144 from dongjoon-hyun/remove_redundant_the
Remove redundant `the`.
2016-02-11 17:17:48 -08:00
Joshua Haberman
d2c7fe6bc5 Merge pull request #1194 from Photonios/master
Fixed unused parameters and extra ';'
2016-02-11 11:36:34 -08:00
Joshua Haberman
655a9d667f Merge pull request #1217 from jhump/jh/make-warning-useful
make 'no syntax' warning useful by showing which file
2016-02-11 10:43:47 -08:00
Joshua Haberman
a924e0b858 Merge pull request #1185 from kkm000/icl-fix
Fix Intel compiler warnings in include files on Windows
2016-02-10 14:12:29 -08:00
Joshua Humphries
d740bc9bd1 make 'no syntax' warning useful by showing which file 2016-02-06 08:34:08 -05:00
Jon Skeet
7762f163a4 Rename Preconditions to ProtoPreconditions
(Generated code changes in next commit.)
2016-02-04 14:50:43 +00:00
Jon Skeet
a3ea9d1203 Rename GeneratedCodeInfo to GeneratedClrTypeInfo
Recently, descriptor.proto gained a GeneratedCodeInfo message, which means the generated code conflicts with our type.
Unfortunately this affects codegen as well, although this is a part of the public API which is very unlikely to affect hand-written code.

Generated code changes in next commit.
2016-02-04 07:05:49 +00:00
Dongjoon Hyun
7a9040fe7f Remove redundant the in comments. 2016-02-03 15:27:27 -08:00
Jisi Liu
5221dcbe47 Integrate from google internal.
Java files are moved to un-do the hack in the prevous commit, which
moved the java files to the original position for integration.
2016-01-29 13:51:05 -08:00
Swen Kooij
37d6cf9cfe Fixed unused parameters and extra ';' 2016-01-28 11:40:07 +02:00
kkm
714b6b761b Fix Intel compiler warnings in include files on Windows 2016-01-27 14:23:36 -08:00
Feng Xiao
d0e0114f31 Refactor README.md.
Move the original README.md to src since it's talking about C++
exclusively and add a more general README.md to document how
to install protoc for all languages.
2016-01-21 17:30:45 -08:00
Brian Silverman
96c2dd5dfc Avoid upcasting uninitialized pointers
Fixes google/protobuf#693

msan flags this as being undefined behavior. I think it's triggering
because the compiler has to insert a branch to avoid changing the
pointer's value if it starts out NULL. I can't figure out if this is
actually undefined behavior or not, but it definitely seems to be a gray
area of the standard which is best avoided.
2016-01-20 23:05:25 -05:00
Feng Xiao
fe066bd514 Merge pull request #789 from motahan/solaris64_fix
Fixing compile errors on Solaris in 64-bit mode
2016-01-20 16:57:01 -08:00
John Burke
3937dedbff Fix compiler warning from repeated_field.h 2016-01-19 15:13:25 -08:00
Feng Xiao
bbe6e430f6 Merge pull request #896 from jhump/jh/fix-ioexception-vs-invalidprotobuf-exception
throw IOException instead of InvalidProtocolBufferException when appropriate
2016-01-16 20:54:31 -08:00
Joshua Humphries
60654349e7 fully qualify invocations of static methods on GeneratedMessage 2016-01-15 21:51:19 -05:00
Joshua Humphries
f3c75580e4 throw IOException instead of InvalidProtocolBufferException when appropriate 2016-01-15 21:51:19 -05:00
Jon Skeet
b1ea15f7a5 Make sure that
"valueField": null

is parsed appropriately, i.e. that it remembers that the field is set.
2016-01-15 14:18:16 +00:00
Jon Skeet
9e4f354f14 Prohibit null values in map fields
On deserialization, missing values for message types
are replaced with a "default" message.
2016-01-11 09:34:43 +00:00
Feng Xiao
8f2b622944 Fix appveyor build. 2016-01-09 00:48:49 -08:00
Feng Xiao
76195058e2 Patch internal change 111557819.
Defer calls to mutable_unknown_fields() until it is actually required to
save memory for C++ lite runtime.

Change-Id: Ica9c1fd276cdb164942d1e7b6e098c83ee3ffdc5
2016-01-06 18:10:24 -08:00
Feng Xiao
17347e3d0d Fix for Visual Studio 2008. 2015-12-30 01:18:22 -08:00
Feng Xiao
c5147e3d51 Fix a misplaced macro.
Change-Id: Ife609e073bd142d328b680c753f543bb18f4f66d
2015-12-28 16:40:39 -08:00
Feng Xiao
7a9d5825e2 Fix a compiler warning.
Change-Id: I4c4e2a4a248e4336fef735f75ff5648d8d33627e
2015-12-28 16:30:59 -08:00
Feng Xiao
b7610f129d Add missing files to EXTRA_DIST.
Also delete some unused files.
2015-12-28 14:18:49 -08:00
Feng Xiao
d217808417 Merge branch master into v3.0.0-beta-2 2015-12-21 00:34:19 -08:00
Feng Xiao
b27f2893b2 Merge pull request #1062 from rinatz/master
Fix static non-pod type problem with dlopen
2015-12-18 17:36:14 -08:00
Kenichiro IDA
674e92d314 Initialize singleton instance by GoogleOnceInit() 2015-12-19 10:14:42 +09:00
Feng Xiao
a0cecfd31a Make conformance tests build for C++ and Java.
Change-Id: Ibb3fe6f919cc7ca0df91da5e1697ba33d259e433
2015-12-16 13:38:10 -08:00
Kenichiro IDA
894d18fba4 Alter FileDescriptorTables::kEmpty to GetEmptyInstance() 2015-12-17 01:46:48 +09:00
Jon Skeet
aabc6c411a Make ToString() valid without a type registry
This addresses issue #1008, by creating a JsonFormatter which is private and only different
to JsonFormatter.Default in terms of reference equality.

Other plausible designs:

- The same, but expose the diagnostic-only formatter
- Add something to settings to say "I don't have a type registry at all"
- Change the behaviour of JsonFormatter.Default (bad idea IMO, as we really *don't* want the result of this used as regular JSON to be parsed)

Note that just trying to find a separate fix to issue #933 and using that to override Any.ToString() differently wouldn't work for messages that *contain* an Any.

Generated code changes follow in the next commit.
2015-12-15 09:23:38 +00:00
Feng Xiao
85c4c36c82 Remove the usage of C++11 override.
[skip appveyor]

Change-Id: I700f70e734abb6264db29369ecf227a9e1f783e7
2015-12-14 14:49:44 -08:00
Feng Xiao
e841bac4fc Down-integrate from internal code base. 2015-12-11 17:10:28 -08:00
Feng Xiao
9cbf40873d Merge pull request #1025 from Yangqing/master
Arena type traits standardization.
2015-12-09 16:58:18 -08:00
Yangqing Jia
031558bd36 Minor changes to match the internal version 2015-12-09 15:25:02 -08:00
Feng Xiao
723010dc54 Merge pull request #1033 from c0nk/wip-implicit-cast-fix
Fix narrowing implicit cast in generated message [NFC]
2015-12-09 13:40:38 -08:00
Kal Conley
f42a68df54 Fix narrowing implicit cast in generated message [NFC] 2015-12-08 23:12:06 -08:00
Bo Yang
1f0286a404 Use angle bracket for well known type proto header. 2015-12-08 14:43:45 -08:00
Yangqing Jia
bbf64cee3d Arena type traits standardization.
This is adapted from the branch of @xfxyjwf at:

494716a682

and should solve the protobuf compilation problem against nvcc.

Tested against nvcc 6.5 and 7.0.
2015-12-05 18:36:18 -08:00
Thomas Van Lenten
536059e569 Tweak the error message as the generate is in the core binary these days. 2015-12-02 14:43:29 -05:00