Commit 34996c31 authored by Jisi Liu's avatar Jisi Liu

Merge branch '3.1.x' of github.com:google/protobuf into 3.1.x

parents 923314cc 8c88762e
......@@ -5,7 +5,7 @@
# dependent projects use the :git notation to refer to the library.
Pod::Spec.new do |s|
s.name = 'Protobuf'
s.version = '3.1.0-alpha-1'
s.version = '3.1.0'
s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.'
s.homepage = 'https://github.com/google/protobuf'
s.license = 'New BSD'
......
......@@ -17,7 +17,7 @@ AC_PREREQ(2.59)
# In the SVN trunk, the version should always be the next anticipated release
# version with the "-pre" suffix. (We used to use "-SNAPSHOT" but this pushed
# the size of one file name in the dist tarfile over the 99-char limit.)
AC_INIT([Protocol Buffers],[3.1.0-alpha-1],[protobuf@googlegroups.com],[protobuf])
AC_INIT([Protocol Buffers],[3.1.0],[protobuf@googlegroups.com],[protobuf])
AM_MAINTAINER_MODE([enable])
......
......@@ -5,7 +5,7 @@
<title>Google Protocol Buffers tools</title>
<summary>Tools for Protocol Buffers - Google's data interchange format.</summary>
<description>See project site for more info.</description>
<version>3.1.0-alpha1</version>
<version>3.1.0</version>
<authors>Google Inc.</authors>
<owners>protobuf-packages</owners>
<licenseUrl>https://github.com/google/protobuf/blob/master/LICENSE</licenseUrl>
......
{
"version": "3.1.0-alpha-1",
"version": "3.1.0",
"title": "Google Protocol Buffers",
"description": "See project site for more info.",
"authors": [ "Google Inc." ],
......
......@@ -6,7 +6,7 @@
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>3.1.0-alpha-1</version>
<version>3.1.0</version>
</parent>
<artifactId>protobuf-java</artifactId>
......
......@@ -6,7 +6,7 @@
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>3.1.0-alpha-1</version>
<version>3.0.0</version>
</parent>
<artifactId>protobuf-lite</artifactId>
......
......@@ -11,7 +11,7 @@
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>3.1.0-alpha-1</version>
<version>3.1.0</version>
<packaging>pom</packaging>
<name>Protocol Buffers [Parent]</name>
......
......@@ -6,7 +6,7 @@
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>3.1.0-alpha-1</version>
<version>3.1.0</version>
</parent>
<artifactId>protobuf-java-util</artifactId>
......
......@@ -10,7 +10,7 @@
</parent>
<groupId>com.google.protobuf.nano</groupId>
<artifactId>protobuf-javanano</artifactId>
<version>3.1.0-alpha-1</version>
<version>3.1.0</version>
<packaging>bundle</packaging>
<name>Protocol Buffer JavaNano API</name>
<description>
......
{
"name": "google-protobuf",
"version": "3.1.0-alpha.1",
"version": "3.1.0",
"description": "Protocol Buffers for JavaScript",
"main": "google-protobuf.js",
"files": [
......
......@@ -10,11 +10,11 @@
<email>protobuf-opensource@google.com</email>
<active>yes</active>
</lead>
<date>2016-09-02</date>
<date>2016-09-23</date>
<time>16:06:07</time>
<version>
<release>3.1.0a1</release>
<api>3.1.0</api>
<api>3.1.0a1</api>
</version>
<stability>
<release>alpha</release>
......@@ -57,14 +57,15 @@ First alpha release.
<changelog>
<release>
<version>
<release>3.1.0</release>
<api>3.1.0</api>
<release>3.1.0a1</release>
<api>3.1.0a1</api>
</version>
<stability>
<release>alpha</release>
<api>alpha</api>
</stability>
<date>2016-09-02</date>
<date>2016-09-23</date>
<time>16:06:07</time>
<license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
<notes>
First alpha release
......
......@@ -81,41 +81,44 @@ class Message
switch ($value_field->getType()) {
case GPBType::MESSAGE:
case GPBType::GROUP:
$this->$setter(
new MapField(
$key_field->getType(),
$value_field->getType(),
$value_field->getMessageType()->getClass()));
$map_field = new MapField(
$key_field->getType(),
$value_field->getType(),
$value_field->getMessageType()->getClass());
$this->$setter($map_field);
break;
case GPBType::ENUM:
$this->$setter(
new MapField(
$key_field->getType(),
$value_field->getType(),
$value_field->getEnumType()->getClass()));
$map_field = new MapField(
$key_field->getType(),
$value_field->getType(),
$value_field->getEnumType()->getClass());
$this->$setter($map_field);
break;
default:
$this->$setter(new MapField($key_field->getType(),
$value_field->getType()));
$map_field = new MapField(
$key_field->getType(),
$value_field->getType());
$this->$setter($map_field);
break;
}
} else if ($field->getLabel() === GPBLabel::REPEATED) {
switch ($field->getType()) {
case GPBType::MESSAGE:
case GPBType::GROUP:
$this->$setter(
new RepeatedField(
$field->getType(),
$field->getMessageType()->getClass()));
$repeated_field = new RepeatedField(
$field->getType(),
$field->getMessageType()->getClass());
$this->$setter($repeated_field);
break;
case GPBType::ENUM:
$this->$setter(
new RepeatedField(
$field->getType(),
$field->getEnumType()->getClass()));
$repeated_field = new RepeatedField(
$field->getType(),
$field->getEnumType()->getClass());
$this->$setter($repeated_field);
break;
default:
$this->$setter(new RepeatedField($field->getType()));
$repeated_field = new RepeatedField($field->getType());
$this->$setter($repeated_field);
break;
}
} else if ($field->getOneofIndex() !== -1) {
......
......@@ -50,6 +50,8 @@ class TestUtil
public static function setTestMessage(TestMessage $m)
{
$sub = new TestMessage_Sub();
$m->setOptionalInt32(-42);
$m->setOptionalInt64(-43);
$m->setOptionalUint32(42);
......@@ -66,7 +68,7 @@ class TestUtil
$m->setOptionalString('a');
$m->setOptionalBytes('b');
$m->setOptionalEnum(TestEnum::ONE);
$m->setOptionalMessage(new TestMessage_Sub());
$m->setOptionalMessage($sub);
$m->getOptionalMessage()->SetA(33);
$m->getRepeatedInt32() []= -42;
......
......@@ -10,7 +10,7 @@
</parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protoc</artifactId>
<version>3.1.0-alpha-1</version>
<version>3.1.0</version>
<packaging>pom</packaging>
<name>Protobuf Compiler</name>
<description>
......
......@@ -30,7 +30,7 @@
# Copyright 2007 Google Inc. All Rights Reserved.
__version__ = '3.1.0a1'
__version__ = '3.1.0'
if __name__ != '__main__':
try:
......
PATH
remote: .
specs:
google-protobuf (3.1.0.alpha.1.0)
google-protobuf (3.1.0)
GEM
remote: https://rubygems.org/
......
Gem::Specification.new do |s|
s.name = "google-protobuf"
s.version = "3.1.0.alpha.1.0"
s.version = "3.1.0"
s.licenses = ["BSD"]
s.summary = "Protocol Buffers"
s.description = "Protocol Buffers are Google's data interchange format."
......
......@@ -218,7 +218,7 @@ libprotobuf_lite_la_SOURCES = \
google/protobuf/io/zero_copy_stream_impl_lite.cc
libprotobuf_la_LIBADD = $(PTHREAD_LIBS)
libprotobuf_la_LDFLAGS = -version-info 10:0:0 -export-dynamic -no-undefined
libprotobuf_la_LDFLAGS = -version-info 11:0:0 -export-dynamic -no-undefined
libprotobuf_la_SOURCES = \
$(libprotobuf_lite_la_SOURCES) \
google/protobuf/any.pb.cc \
......@@ -302,7 +302,7 @@ libprotobuf_la_SOURCES = \
nodist_libprotobuf_la_SOURCES = $(nodist_libprotobuf_lite_la_SOURCES)
libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la
libprotoc_la_LDFLAGS = -version-info 10:0:0 -export-dynamic -no-undefined
libprotoc_la_LDFLAGS = -version-info 11:0:0 -export-dynamic -no-undefined
libprotoc_la_SOURCES = \
google/protobuf/compiler/code_generator.cc \
google/protobuf/compiler/command_line_interface.cc \
......
This diff is collapsed.
......@@ -2082,6 +2082,13 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message /* @@p
bool java_multiple_files() const;
void set_java_multiple_files(bool value);
// optional bool java_generate_equals_and_hash = 20 [deprecated = true];
GOOGLE_PROTOBUF_DEPRECATED_ATTR bool has_java_generate_equals_and_hash() const;
GOOGLE_PROTOBUF_DEPRECATED_ATTR void clear_java_generate_equals_and_hash();
GOOGLE_PROTOBUF_DEPRECATED_ATTR static const int kJavaGenerateEqualsAndHashFieldNumber = 20;
GOOGLE_PROTOBUF_DEPRECATED_ATTR bool java_generate_equals_and_hash() const;
GOOGLE_PROTOBUF_DEPRECATED_ATTR void set_java_generate_equals_and_hash(bool value);
// optional bool java_string_check_utf8 = 27 [default = false];
bool has_java_string_check_utf8() const;
void clear_java_string_check_utf8();
......@@ -2188,6 +2195,8 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message /* @@p
inline void clear_has_java_outer_classname();
inline void set_has_java_multiple_files();
inline void clear_has_java_multiple_files();
inline void set_has_java_generate_equals_and_hash();
inline void clear_has_java_generate_equals_and_hash();
inline void set_has_java_string_check_utf8();
inline void clear_has_java_string_check_utf8();
inline void set_has_optimize_for();
......@@ -2221,6 +2230,7 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message /* @@p
::google::protobuf::internal::ArenaStringPtr objc_class_prefix_;
::google::protobuf::internal::ArenaStringPtr csharp_namespace_;
bool java_multiple_files_;
bool java_generate_equals_and_hash_;
bool java_string_check_utf8_;
bool cc_generic_services_;
bool java_generic_services_;
......@@ -6292,15 +6302,39 @@ inline void FileOptions::set_java_multiple_files(bool value) {
// @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_multiple_files)
}
// optional bool java_generate_equals_and_hash = 20 [deprecated = true];
inline bool FileOptions::has_java_generate_equals_and_hash() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
inline void FileOptions::set_has_java_generate_equals_and_hash() {
_has_bits_[0] |= 0x00000008u;
}
inline void FileOptions::clear_has_java_generate_equals_and_hash() {
_has_bits_[0] &= ~0x00000008u;
}
inline void FileOptions::clear_java_generate_equals_and_hash() {
java_generate_equals_and_hash_ = false;
clear_has_java_generate_equals_and_hash();
}
inline bool FileOptions::java_generate_equals_and_hash() const {
// @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_generate_equals_and_hash)
return java_generate_equals_and_hash_;
}
inline void FileOptions::set_java_generate_equals_and_hash(bool value) {
set_has_java_generate_equals_and_hash();
java_generate_equals_and_hash_ = value;
// @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_generate_equals_and_hash)
}
// optional bool java_string_check_utf8 = 27 [default = false];
inline bool FileOptions::has_java_string_check_utf8() const {
return (_has_bits_[0] & 0x00000008u) != 0;
return (_has_bits_[0] & 0x00000010u) != 0;
}
inline void FileOptions::set_has_java_string_check_utf8() {
_has_bits_[0] |= 0x00000008u;
_has_bits_[0] |= 0x00000010u;
}
inline void FileOptions::clear_has_java_string_check_utf8() {
_has_bits_[0] &= ~0x00000008u;
_has_bits_[0] &= ~0x00000010u;
}
inline void FileOptions::clear_java_string_check_utf8() {
java_string_check_utf8_ = false;
......@@ -6318,13 +6352,13 @@ inline void FileOptions::set_java_string_check_utf8(bool value) {
// optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
inline bool FileOptions::has_optimize_for() const {
return (_has_bits_[0] & 0x00000010u) != 0;
return (_has_bits_[0] & 0x00000020u) != 0;
}
inline void FileOptions::set_has_optimize_for() {
_has_bits_[0] |= 0x00000010u;
_has_bits_[0] |= 0x00000020u;
}
inline void FileOptions::clear_has_optimize_for() {
_has_bits_[0] &= ~0x00000010u;
_has_bits_[0] &= ~0x00000020u;
}
inline void FileOptions::clear_optimize_for() {
optimize_for_ = 1;
......@@ -6343,13 +6377,13 @@ inline void FileOptions::set_optimize_for(::google::protobuf::FileOptions_Optimi
// optional string go_package = 11;
inline bool FileOptions::has_go_package() const {
return (_has_bits_[0] & 0x00000020u) != 0;
return (_has_bits_[0] & 0x00000040u) != 0;
}
inline void FileOptions::set_has_go_package() {
_has_bits_[0] |= 0x00000020u;
_has_bits_[0] |= 0x00000040u;
}
inline void FileOptions::clear_has_go_package() {
_has_bits_[0] &= ~0x00000020u;
_has_bits_[0] &= ~0x00000040u;
}
inline void FileOptions::clear_go_package() {
go_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
......@@ -6397,13 +6431,13 @@ inline void FileOptions::set_allocated_go_package(::std::string* go_package) {
// optional bool cc_generic_services = 16 [default = false];
inline bool FileOptions::has_cc_generic_services() const {
return (_has_bits_[0] & 0x00000040u) != 0;
return (_has_bits_[0] & 0x00000080u) != 0;
}
inline void FileOptions::set_has_cc_generic_services() {
_has_bits_[0] |= 0x00000040u;
_has_bits_[0] |= 0x00000080u;
}
inline void FileOptions::clear_has_cc_generic_services() {
_has_bits_[0] &= ~0x00000040u;
_has_bits_[0] &= ~0x00000080u;
}
inline void FileOptions::clear_cc_generic_services() {
cc_generic_services_ = false;
......@@ -6421,13 +6455,13 @@ inline void FileOptions::set_cc_generic_services(bool value) {
// optional bool java_generic_services = 17 [default = false];
inline bool FileOptions::has_java_generic_services() const {
return (_has_bits_[0] & 0x00000080u) != 0;
return (_has_bits_[0] & 0x00000100u) != 0;
}
inline void FileOptions::set_has_java_generic_services() {
_has_bits_[0] |= 0x00000080u;
_has_bits_[0] |= 0x00000100u;
}
inline void FileOptions::clear_has_java_generic_services() {
_has_bits_[0] &= ~0x00000080u;
_has_bits_[0] &= ~0x00000100u;
}
inline void FileOptions::clear_java_generic_services() {
java_generic_services_ = false;
......@@ -6445,13 +6479,13 @@ inline void FileOptions::set_java_generic_services(bool value) {
// optional bool py_generic_services = 18 [default = false];
inline bool FileOptions::has_py_generic_services() const {
return (_has_bits_[0] & 0x00000100u) != 0;
return (_has_bits_[0] & 0x00000200u) != 0;
}
inline void FileOptions::set_has_py_generic_services() {
_has_bits_[0] |= 0x00000100u;
_has_bits_[0] |= 0x00000200u;
}
inline void FileOptions::clear_has_py_generic_services() {
_has_bits_[0] &= ~0x00000100u;
_has_bits_[0] &= ~0x00000200u;
}
inline void FileOptions::clear_py_generic_services() {
py_generic_services_ = false;
......@@ -6469,13 +6503,13 @@ inline void FileOptions::set_py_generic_services(bool value) {
// optional bool deprecated = 23 [default = false];
inline bool FileOptions::has_deprecated() const {
return (_has_bits_[0] & 0x00000200u) != 0;
return (_has_bits_[0] & 0x00000400u) != 0;
}
inline void FileOptions::set_has_deprecated() {
_has_bits_[0] |= 0x00000200u;
_has_bits_[0] |= 0x00000400u;
}
inline void FileOptions::clear_has_deprecated() {
_has_bits_[0] &= ~0x00000200u;
_has_bits_[0] &= ~0x00000400u;
}
inline void FileOptions::clear_deprecated() {
deprecated_ = false;
......@@ -6493,13 +6527,13 @@ inline void FileOptions::set_deprecated(bool value) {
// optional bool cc_enable_arenas = 31 [default = false];
inline bool FileOptions::has_cc_enable_arenas() const {
return (_has_bits_[0] & 0x00000400u) != 0;
return (_has_bits_[0] & 0x00000800u) != 0;
}
inline void FileOptions::set_has_cc_enable_arenas() {
_has_bits_[0] |= 0x00000400u;
_has_bits_[0] |= 0x00000800u;
}
inline void FileOptions::clear_has_cc_enable_arenas() {
_has_bits_[0] &= ~0x00000400u;
_has_bits_[0] &= ~0x00000800u;
}
inline void FileOptions::clear_cc_enable_arenas() {
cc_enable_arenas_ = false;
......@@ -6517,13 +6551,13 @@ inline void FileOptions::set_cc_enable_arenas(bool value) {
// optional string objc_class_prefix = 36;
inline bool FileOptions::has_objc_class_prefix() const {
return (_has_bits_[0] & 0x00000800u) != 0;
return (_has_bits_[0] & 0x00001000u) != 0;
}
inline void FileOptions::set_has_objc_class_prefix() {
_has_bits_[0] |= 0x00000800u;
_has_bits_[0] |= 0x00001000u;
}
inline void FileOptions::clear_has_objc_class_prefix() {
_has_bits_[0] &= ~0x00000800u;
_has_bits_[0] &= ~0x00001000u;
}
inline void FileOptions::clear_objc_class_prefix() {
objc_class_prefix_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
......@@ -6571,13 +6605,13 @@ inline void FileOptions::set_allocated_objc_class_prefix(::std::string* objc_cla
// optional string csharp_namespace = 37;
inline bool FileOptions::has_csharp_namespace() const {
return (_has_bits_[0] & 0x00001000u) != 0;
return (_has_bits_[0] & 0x00002000u) != 0;
}
inline void FileOptions::set_has_csharp_namespace() {
_has_bits_[0] |= 0x00001000u;
_has_bits_[0] |= 0x00002000u;
}
inline void FileOptions::clear_has_csharp_namespace() {
_has_bits_[0] &= ~0x00001000u;
_has_bits_[0] &= ~0x00002000u;
}
inline void FileOptions::clear_csharp_namespace() {
csharp_namespace_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
......
......@@ -305,10 +305,8 @@ message FileOptions {
// top-level extensions defined in the file.
optional bool java_multiple_files = 10 [default=false];
// BEGIN PROTOBUF-OPENSOURCE
// // This option does nothing.
// optional bool java_generate_equals_and_hash = 20 [deprecated=true];
// END PROTOBUF-OPENSOURCE
// This option does nothing.
optional bool java_generate_equals_and_hash = 20 [deprecated=true];
// If set true, then the Java2 code generator will generate code that
// throws an exception whenever an attempt is made to assign a non-UTF-8
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment