Compare commits

..

21 commits

Author SHA1 Message Date
Feng Xiao
49a56da93f Update jenkins Java deps. 2017-05-12 16:10:30 -07:00
Feng Xiao
129a6e2aca Revert guava depedency to version 19. 2017-05-12 15:29:08 -07:00
Paul Yang
474cca52a3 Add LICENSE in package.xml (#3083) 2017-05-11 14:52:50 -07:00
Feng Xiao
13f532e472 Merge pull request #3074 from xfxyjwf/3.3.x
Update version number to 3.3.1
2017-05-11 14:32:19 -07:00
Paul Yang
de6ae7d4eb Fix upb load descriptor when no messages defined in prorto. (#3080) 2017-05-11 13:56:05 -07:00
Paul Yang
22319315df Fix c extension for php7.1. (#3077) 2017-05-10 15:59:59 -07:00
Feng Xiao
757cc9f9da Update C++ generated code. 2017-05-08 16:58:13 -07:00
Feng Xiao
58538ea919 Update version number to 3.3.1 2017-05-08 16:02:08 -07:00
Feng Xiao
c2154e124d Merge pull request #3073 from xfxyjwf/3.3.x
Cherry-pick a bug fix: workaround gcc < 4.5.0 bug
2017-05-08 13:38:48 -07:00
Feng Xiao
d22493b6f6 Merge pull request #3064 from randomguy3/offset-type
Fix offset type macro to match the tables it is used in
2017-05-08 11:56:18 -07:00
Mario J. Rugiero
9b82fce7f1 Workaround gcc < 4.5.0 bug
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=189

Signed-off-by: Mario J. Rugiero <mrugiero@gmail.com>
2017-05-08 11:32:23 -07:00
randomguy3
e062f70c6d Fix compilation
<: is a digraph, so a space is necessary for compilation on certain compilers.
2017-05-06 09:08:44 +01:00
Alex Merry
e82d81a884 Fix offset type to match the tables it is used in 2017-05-05 22:04:28 +01:00
Feng Xiao
3c369dc07c Merge pull request #3057 from xfxyjwf/3.3.x
Fix several C++ build issues.
2017-05-05 10:45:23 -07:00
Adam Cozzette
99cf2efa8f Merge pull request #3056 from acozzette/cherry-pick-pr-2873
Cherry-pick the fix from pull request #2873
2017-05-05 08:58:11 -07:00
Feng Xiao
7378ec2bc8 Add missing LIBRPOTOC_EXPORT. 2017-05-04 15:27:30 -07:00
Feng Xiao
3a5a0724f3 Skip C# test in C++ only distribution. 2017-05-04 15:24:55 -07:00
Feng Xiao
8859c07a35 Add missing files to build files. 2017-05-04 15:11:11 -07:00
Paul Jolly
22c8772e21 Fix #1562 by using goog.crypt.byteArrayToString instead of String.fromCharCode.apply 2017-05-04 11:33:01 -07:00
Feng Xiao
dd0a23325d Merge pull request #3055 from chrisn-arm/3.3.x
Fix compilation on alpine 3.5
2017-05-04 11:08:53 -07:00
Chris Nix
c3093d3ee5 Fix issue 3046: compilation on alpine 3.5 2017-05-04 09:50:37 +01:00
46 changed files with 205 additions and 104 deletions

1
BUILD
View file

@ -128,6 +128,7 @@ cc_library(
"src/google/protobuf/extension_set_heavy.cc",
"src/google/protobuf/field_mask.pb.cc",
"src/google/protobuf/generated_message_reflection.cc",
"src/google/protobuf/generated_message_table_driven.cc",
"src/google/protobuf/io/gzip_stream.cc",
"src/google/protobuf/io/printer.cc",
"src/google/protobuf/io/strtod.cc",

View file

@ -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.3.0'
s.version = '3.3.1'
s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.'
s.homepage = 'https://github.com/google/protobuf'
s.license = '3-Clause BSD License'

View file

@ -50,6 +50,7 @@ copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\field_mask.pb.h" incl
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\generated_enum_reflection.h" include\google\protobuf\generated_enum_reflection.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\generated_enum_util.h" include\google\protobuf\generated_enum_util.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\generated_message_reflection.h" include\google\protobuf\generated_message_reflection.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\generated_message_table_driven.h" include\google\protobuf\generated_message_table_driven.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\generated_message_util.h" include\google\protobuf\generated_message_util.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\has_bits.h" include\google\protobuf\has_bits.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\coded_stream.h" include\google\protobuf\io\coded_stream.h
@ -70,6 +71,7 @@ copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\map_type_handler.h" i
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\message.h" include\google\protobuf\message.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\message_lite.h" include\google\protobuf\message_lite.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\metadata.h" include\google\protobuf\metadata.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\metadata_lite.h" include\google\protobuf\metadata_lite.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\reflection.h" include\google\protobuf\reflection.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\reflection_ops.h" include\google\protobuf\reflection_ops.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\repeated_field.h" include\google\protobuf\repeated_field.h

View file

@ -13,6 +13,7 @@ set(libprotobuf_files
${protobuf_source_dir}/src/google/protobuf/extension_set_heavy.cc
${protobuf_source_dir}/src/google/protobuf/field_mask.pb.cc
${protobuf_source_dir}/src/google/protobuf/generated_message_reflection.cc
${protobuf_source_dir}/src/google/protobuf/generated_message_table_driven.cc
${protobuf_source_dir}/src/google/protobuf/io/gzip_stream.cc
${protobuf_source_dir}/src/google/protobuf/io/printer.cc
${protobuf_source_dir}/src/google/protobuf/io/strtod.cc

View file

@ -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.3.0],[protobuf@googlegroups.com],[protobuf])
AC_INIT([Protocol Buffers],[3.3.1],[protobuf@googlegroups.com],[protobuf])
AM_MAINTAINER_MODE([enable])

View file

@ -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.3.0</version>
<version>3.3.1</version>
<authors>Google Inc.</authors>
<owners>protobuf-packages</owners>
<licenseUrl>https://github.com/google/protobuf/blob/master/LICENSE</licenseUrl>

View file

@ -1,5 +1,5 @@
{
"version": "3.3.0",
"version": "3.3.1",
"title": "Google Protocol Buffers",
"description": "See project site for more info.",
"authors": [ "Google Inc." ],

View file

@ -6,7 +6,7 @@
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<artifactId>protobuf-java</artifactId>
@ -34,11 +34,6 @@
<artifactId>easymockclassextension</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>

View file

@ -30,8 +30,6 @@
package com.google.protobuf;
import static com.google.common.truth.Truth.assertThat;
import com.google.protobuf.Descriptors.Descriptor;
import com.google.protobuf.Descriptors.FieldDescriptor;
import com.google.protobuf.TextFormat.Parser.SingularOverwritePolicy;
@ -1079,12 +1077,12 @@ public class TextFormatTest extends TestCase {
{
TestMap.Builder dest = TestMap.newBuilder();
TextFormat.merge(text, dest);
assertThat(dest.build()).isEqualTo(message);
assertEquals(message, dest.build());
}
{
TestMap.Builder dest = TestMap.newBuilder();
parserWithOverwriteForbidden.merge(text, dest);
assertThat(dest.build()).isEqualTo(message);
assertEquals(message, dest.build());
}
}
@ -1096,10 +1094,10 @@ public class TextFormatTest extends TestCase {
TestMap.Builder dest = TestMap.newBuilder();
parserWithOverwriteForbidden.merge(text, dest);
TestMap message = dest.build();
assertThat(message.getStringToInt32Field().size()).isEqualTo(2);
assertThat(message.getInt32ToMessageField().size()).isEqualTo(2);
assertThat(message.getStringToInt32Field().get("x")).isEqualTo(10);
assertThat(message.getInt32ToMessageField().get(2).getValue()).isEqualTo(200);
assertEquals(2, message.getStringToInt32Field().size());
assertEquals(2, message.getInt32ToMessageField().size());
assertEquals(10, message.getStringToInt32Field().get("x").intValue());
assertEquals(200, message.getInt32ToMessageField().get(2).getValue());
}
public void testMapShortFormEmpty() throws Exception {
@ -1108,8 +1106,8 @@ public class TextFormatTest extends TestCase {
TestMap.Builder dest = TestMap.newBuilder();
parserWithOverwriteForbidden.merge(text, dest);
TestMap message = dest.build();
assertThat(message.getStringToInt32Field().size()).isEqualTo(0);
assertThat(message.getInt32ToMessageField().size()).isEqualTo(0);
assertEquals(0, message.getStringToInt32Field().size());
assertEquals(0, message.getInt32ToMessageField().size());
}
public void testMapShortFormTrailingComma() throws Exception {
@ -1119,7 +1117,7 @@ public class TextFormatTest extends TestCase {
parserWithOverwriteForbidden.merge(text, dest);
fail("Expected parse exception.");
} catch (TextFormat.ParseException e) {
assertThat(e).hasMessageThat().isEqualTo("1:48: Expected \"{\".");
assertEquals("1:48: Expected \"{\".", e.getMessage());
}
}
@ -1134,8 +1132,8 @@ public class TextFormatTest extends TestCase {
TestMap.Builder builder = TestMap.newBuilder();
defaultParser.merge(text, builder);
TestMap map = builder.build();
assertThat(map.getInt32ToInt32Field().size()).isEqualTo(2);
assertThat(map.getInt32ToInt32Field().get(1).intValue()).isEqualTo(30);
assertEquals(2, map.getInt32ToInt32Field().size());
assertEquals(30, map.getInt32ToInt32Field().get(1).intValue());
}
{
@ -1144,8 +1142,8 @@ public class TextFormatTest extends TestCase {
TestMap.Builder builder = TestMap.newBuilder();
defaultParser.merge(text, builder);
TestMap map = builder.build();
assertThat(map.getInt32ToInt32Field().size()).isEqualTo(2);
assertThat(map.getInt32ToInt32Field().get(1).intValue()).isEqualTo(30);
assertEquals(2, map.getInt32ToInt32Field().size());
assertEquals(30, map.getInt32ToInt32Field().get(1).intValue());
}
}

View file

@ -11,7 +11,7 @@
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>3.3.0</version>
<version>3.3.1</version>
<packaging>pom</packaging>
<name>Protocol Buffers [Parent]</name>
@ -84,13 +84,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>20.0</version>
</dependency>
<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<scope>test</scope>
<version>0.32</version>
<version>19.0</version>
</dependency>
</dependencies>
</dependencyManagement>

View file

@ -6,7 +6,7 @@
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<artifactId>protobuf-java-util</artifactId>

View file

@ -129,7 +129,7 @@ ENV MVN mvn --batch-mode
RUN cd /tmp && \
git clone https://github.com/google/protobuf.git && \
cd protobuf && \
git reset --hard c2b3b3e04e7a023efe06f2107705b45428847800 && \
git reset --hard 129a6e2aca95dcfb6c3e717d7b9cca1f104fde39 && \
./autogen.sh && \
./configure && \
make -j4 && \
@ -164,6 +164,14 @@ RUN cd php-7.0.18 && ./configure --enable-maintainer-zts --prefix=/usr/local/php
RUN cd php-7.0.18 && make clean && ./configure --prefix=/usr/local/php-7.0 && \
make && make install && cd ..
RUN wget http://am1.php.net/get/php-7.1.4.tar.bz2/from/this/mirror
RUN mv mirror php-7.1.4.tar.bz2
RUN tar -xvf php-7.1.4.tar.bz2
RUN cd php-7.1.4 && ./configure --enable-maintainer-zts --prefix=/usr/local/php-7.1-zts && \
make && make install && cd ..
RUN cd php-7.1.4 && make clean && ./configure --prefix=/usr/local/php-7.1 && \
make && make install && cd ..
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN php composer-setup.php
RUN mv composer.phar /usr/bin/composer
@ -190,7 +198,12 @@ RUN cd /tmp && \
ln -sfn /usr/local/php-7.0/bin/php-config /usr/bin/php-config && \
ln -sfn /usr/local/php-7.0/bin/phpize /usr/bin/phpize && \
composer install && \
mv vendor /usr/local/vendor-7.0
mv vendor /usr/local/vendor-7.0 && \
ln -sfn /usr/local/php-7.1/bin/php /usr/bin/php && \
ln -sfn /usr/local/php-7.1/bin/php-config /usr/bin/php-config && \
ln -sfn /usr/local/php-7.1/bin/phpize /usr/bin/phpize && \
composer install && \
mv vendor /usr/local/vendor-7.1
##################
# Go dependencies.

View file

@ -57,30 +57,6 @@ RUN apt-get clean && apt-get update && apt-get install -y --force-yes \
##################
# PHP dependencies.
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN php composer-setup.php
RUN mv composer.phar /usr/bin/composer
RUN php -r "unlink('composer-setup.php');"
RUN cd /tmp && \
git clone https://github.com/google/protobuf.git && \
cd protobuf/php && \
git reset --hard 6b27c1f981a9a93918e4039f236ead27165a8e91 && \
ln -sfn /usr/bin/php5.5 /usr/bin/php && \
ln -sfn /usr/bin/php-config5.5 /usr/bin/php-config && \
ln -sfn /usr/bin/phpize5.5 /usr/bin/phpize && \
composer install && \
mv vendor /usr/local/vendor-5.5 && \
ln -sfn /usr/bin/php5.6 /usr/bin/php && \
ln -sfn /usr/bin/php-config5.6 /usr/bin/php-config && \
ln -sfn /usr/bin/phpize5.6 /usr/bin/phpize && \
composer install && \
mv vendor /usr/local/vendor-5.6 && \
ln -sfn /usr/bin/php7.0 /usr/bin/php && \
ln -sfn /usr/bin/php-config7.0 /usr/bin/php-config && \
ln -sfn /usr/bin/phpize7.0 /usr/bin/phpize && \
composer install && \
mv vendor /usr/local/vendor-7.0
RUN wget http://am1.php.net/get/php-5.5.38.tar.bz2/from/this/mirror
RUN mv mirror php-5.5.38.tar.bz2
RUN tar -xvf php-5.5.38.tar.bz2
@ -105,6 +81,45 @@ RUN cd php-7.0.18 && ./configure --enable-maintainer-zts --prefix=/usr/local/php
RUN cd php-7.0.18 && make clean && ./configure --enable-bcmath --prefix=/usr/local/php-7.0 && \
make && make install && cd ..
RUN wget http://am1.php.net/get/php-7.1.4.tar.bz2/from/this/mirror
RUN mv mirror php-7.1.4.tar.bz2
RUN tar -xvf php-7.1.4.tar.bz2
RUN cd php-7.1.4 && ./configure --enable-maintainer-zts --prefix=/usr/local/php-7.1-zts && \
make && make install && cd ..
RUN cd php-7.1.4 && make clean && ./configure --enable-bcmath --prefix=/usr/local/php-7.1 && \
make && make install && cd ..
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN php composer-setup.php
RUN mv composer.phar /usr/bin/composer
RUN php -r "unlink('composer-setup.php');"
RUN composer config -g -- disable-tls true
RUN composer config -g -- secure-http false
RUN cd /tmp && \
git clone https://github.com/google/protobuf.git && \
cd protobuf/php && \
git reset --hard 6b27c1f981a9a93918e4039f236ead27165a8e91 && \
ln -sfn /usr/local/php-5.5/bin/php /usr/bin/php && \
ln -sfn /usr/local/php-5.5/bin/php-config /usr/bin/php-config && \
ln -sfn /usr/local/php-5.5/bin/phpize /usr/bin/phpize && \
composer install && \
mv vendor /usr/local/vendor-5.5 && \
ln -sfn /usr/local/php-5.6/bin/php /usr/bin/php && \
ln -sfn /usr/local/php-5.6/bin/php-config /usr/bin/php-config && \
ln -sfn /usr/local/php-5.6/bin/phpize /usr/bin/phpize && \
composer install && \
mv vendor /usr/local/vendor-5.6 && \
ln -sfn /usr/local/php-7.0/bin/php /usr/bin/php && \
ln -sfn /usr/local/php-7.0/bin/php-config /usr/bin/php-config && \
ln -sfn /usr/local/php-7.0/bin/phpize /usr/bin/phpize && \
composer install && \
mv vendor /usr/local/vendor-7.0 && \
ln -sfn /usr/local/php-7.1/bin/php /usr/bin/php && \
ln -sfn /usr/local/php-7.1/bin/php-config /usr/bin/php-config && \
ln -sfn /usr/local/php-7.1/bin/phpize /usr/bin/phpize && \
composer install && \
mv vendor /usr/local/vendor-7.1
##################
# Python dependencies

View file

@ -994,7 +994,7 @@ jspb.BinaryDecoder.prototype.readString = function(length) {
codeUnits.length = 0;
}
}
result += String.fromCharCode.apply(null, codeUnits);
result += goog.crypt.byteArrayToString(codeUnits);
this.cursor_ = cursor;
return result;
};

View file

@ -613,7 +613,7 @@ jspb.utils.decimalStringToHash64 = function(dec) {
muladd(1, 1);
}
return String.fromCharCode.apply(null, resultBytes);
return goog.crypt.byteArrayToString(resultBytes);
};

View file

@ -205,31 +205,31 @@ describe('binaryUtilsTest', function() {
var convert = jspb.utils.decimalStringToHash64;
result = convert('0');
assertEquals(String.fromCharCode.apply(null,
assertEquals(goog.crypt.byteArrayToString(
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]), result);
result = convert('-1');
assertEquals(String.fromCharCode.apply(null,
assertEquals(goog.crypt.byteArrayToString(
[0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]), result);
result = convert('18446744073709551615');
assertEquals(String.fromCharCode.apply(null,
assertEquals(goog.crypt.byteArrayToString(
[0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]), result);
result = convert('9223372036854775808');
assertEquals(String.fromCharCode.apply(null,
assertEquals(goog.crypt.byteArrayToString(
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80]), result);
result = convert('-9223372036854775808');
assertEquals(String.fromCharCode.apply(null,
assertEquals(goog.crypt.byteArrayToString(
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80]), result);
result = convert('123456789123456789');
assertEquals(String.fromCharCode.apply(null,
assertEquals(goog.crypt.byteArrayToString(
[0x15, 0x5F, 0xD0, 0xAC, 0x4B, 0x9B, 0xB6, 0x01]), result);
result = convert('-123456789123456789');
assertEquals(String.fromCharCode.apply(null,
assertEquals(goog.crypt.byteArrayToString(
[0xEB, 0xA0, 0x2F, 0x53, 0xB4, 0x64, 0x49, 0xFE]), result);
});
@ -259,21 +259,21 @@ describe('binaryUtilsTest', function() {
var convert = jspb.utils.hexStringToHash64;
result = convert('0x0000000000000000');
assertEquals(String.fromCharCode.apply(null,
assertEquals(goog.crypt.byteArrayToString(
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]), result);
result = convert('0xffffffffffffffff');
assertEquals(String.fromCharCode.apply(null,
assertEquals(goog.crypt.byteArrayToString(
[0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]), result);
// Hex string is big-endian, hash string is little-endian.
result = convert('0x123456789ABCDEF0');
assertEquals(String.fromCharCode.apply(null,
assertEquals(goog.crypt.byteArrayToString(
[0xF0, 0xDE, 0xBC, 0x9A, 0x78, 0x56, 0x34, 0x12]), result);
// Capitalization should not matter.
result = convert('0x0000abcdefABCDEF');
assertEquals(String.fromCharCode.apply(null,
assertEquals(goog.crypt.byteArrayToString(
[0xEF, 0xCD, 0xAB, 0xEF, 0xCD, 0xAB, 0x00, 0x00]), result);
});
@ -643,7 +643,7 @@ describe('binaryUtilsTest', function() {
var sourceBytes = new Uint8Array(sourceData);
var sourceBuffer = sourceBytes.buffer;
var sourceBase64 = goog.crypt.base64.encodeByteArray(sourceData);
var sourceString = String.fromCharCode.apply(null, sourceData);
var sourceString = goog.crypt.byteArrayToString(sourceData);
function check(result) {
assertEquals(Uint8Array, result.constructor);

View file

@ -1,6 +1,6 @@
{
"name": "google-protobuf",
"version": "3.3.0",
"version": "3.3.1",
"description": "Protocol Buffers for JavaScript",
"main": "google-protobuf.js",
"files": [

View file

@ -116,7 +116,11 @@ static void message_set_property(zval* object, zval* member, zval* value,
return;
}
#if PHP_MAJOR_VERSION < 7 || (PHP_MAJOR_VERSION == 7 && PHP_MINOR_VERSION == 0)
if (Z_OBJCE_P(object) != EG(scope)) {
#else
if (Z_OBJCE_P(object) != zend_get_executed_scope()) {
#endif
// User cannot set property directly (e.g., $m->a = 1)
zend_error(E_USER_ERROR, "Cannot access private property.");
return;
@ -146,7 +150,11 @@ static zval* message_get_property(zval* object, zval* member, int type,
return PHP_PROTO_GLOBAL_UNINITIALIZED_ZVAL;
}
#if PHP_MAJOR_VERSION < 7 || (PHP_MAJOR_VERSION == 7 && PHP_MINOR_VERSION == 0)
if (Z_OBJCE_P(object) != EG(scope)) {
#else
if (Z_OBJCE_P(object) != zend_get_executed_scope()) {
#endif
// User cannot get property directly (e.g., $a = $m->a)
zend_error(E_USER_ERROR, "Cannot access private property.");
return PHP_PROTO_GLOBAL_UNINITIALIZED_ZVAL;

View file

@ -13,7 +13,7 @@
<date>2017-01-13</date>
<time>16:06:07</time>
<version>
<release>3.3.0</release>
<release>3.3.1</release>
<api>3.3.0</api>
</version>
<stability>
@ -40,6 +40,7 @@ GA release.
<file baseinstalldir="/" name="upb.h" role="src" />
<file baseinstalldir="/" name="utf8.c" role="src" />
<file baseinstalldir="/" name="utf8.h" role="src" />
<file baseinstalldir="/" name="LICENSE" role="doc" />
</dir>
</contents>
<dependencies>
@ -100,6 +101,22 @@ Second alpha release.
<time>16:06:07</time>
<license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license>
<notes>
GA release.
</notes>
</release>
<release>
<version>
<release>3.3.1</release>
<api>3.3.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2017-05-08</date>
<time>15:33:07</time>
<license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license>
<notes>
GA release.
</notes>
</release>

View file

@ -37,7 +37,7 @@
#include "upb.h"
#define PHP_PROTOBUF_EXTNAME "protobuf"
#define PHP_PROTOBUF_VERSION "3.3.0"
#define PHP_PROTOBUF_VERSION "3.3.1"
#define MAX_LENGTH_OF_INT64 20
#define SIZEOF_INT64 8

View file

@ -2290,6 +2290,9 @@ bool upb_symtab_addfile(upb_symtab *s, upb_filedef *file, upb_status *status) {
bool ret;
n = upb_filedef_defcount(file);
if (n == 0) {
return true;
}
defs = upb_gmalloc(sizeof(*defs) * n);
if (defs == NULL) {

View file

@ -10,7 +10,7 @@
</parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protoc</artifactId>
<version>3.3.0</version>
<version>3.3.1</version>
<packaging>pom</packaging>
<name>Protobuf Compiler</name>
<description>

View file

@ -30,7 +30,7 @@
# Copyright 2007 Google Inc. All Rights Reserved.
__version__ = '3.3.0'
__version__ = '3.3.1'
if __name__ != '__main__':
try:

View file

@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "google-protobuf"
s.version = "3.3.0"
s.version = "3.3.1"
s.licenses = ["BSD-3-Clause"]
s.summary = "Protocol Buffers"
s.description = "Protocol Buffers are Google's data interchange format."

View file

@ -184,7 +184,7 @@ nobase_include_HEADERS = \
lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la
libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS)
libprotobuf_lite_la_LDFLAGS = -version-info 13:0:0 -export-dynamic -no-undefined
libprotobuf_lite_la_LDFLAGS = -version-info 13:1:0 -export-dynamic -no-undefined
if HAVE_LD_VERSION_SCRIPT
libprotobuf_lite_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf-lite.map
EXTRA_libprotobuf_lite_la_DEPENDENCIES = libprotobuf-lite.map
@ -229,7 +229,7 @@ libprotobuf_lite_la_SOURCES = \
google/protobuf/io/zero_copy_stream_impl_lite.cc
libprotobuf_la_LIBADD = $(PTHREAD_LIBS)
libprotobuf_la_LDFLAGS = -version-info 13:0:0 -export-dynamic -no-undefined
libprotobuf_la_LDFLAGS = -version-info 13:1:0 -export-dynamic -no-undefined
if HAVE_LD_VERSION_SCRIPT
libprotobuf_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf.map
EXTRA_libprotobuf_la_DEPENDENCIES = libprotobuf.map
@ -250,6 +250,7 @@ libprotobuf_la_SOURCES = \
google/protobuf/extension_set_heavy.cc \
google/protobuf/field_mask.pb.cc \
google/protobuf/generated_message_reflection.cc \
google/protobuf/generated_message_table_driven.cc \
google/protobuf/map_field.cc \
google/protobuf/message.cc \
google/protobuf/reflection_internal.h \
@ -318,7 +319,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 13:0:0 -export-dynamic -no-undefined
libprotoc_la_LDFLAGS = -version-info 13:1:0 -export-dynamic -no-undefined
if HAVE_LD_VERSION_SCRIPT
libprotoc_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotoc.map
EXTRA_libprotoc_la_DEPENDENCIES = libprotoc.map

View file

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#if 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.

View file

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#if 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.

View file

@ -162,8 +162,8 @@ typedef GeneratorContext OutputDirectory;
// "foo=bar,baz,qux=corge"
// parses to the pairs:
// ("foo", "bar"), ("baz", ""), ("qux", "corge")
extern void ParseGeneratorParameter(const string&,
std::vector<std::pair<string, string> >*);
LIBPROTOC_EXPORT void ParseGeneratorParameter(
const string&, std::vector<std::pair<string, string> >*);
} // namespace compiler
} // namespace protobuf

View file

@ -134,6 +134,14 @@ class GenerateAndTest {
};
TEST(CsharpBootstrapTest, GeneratedCsharpDescriptorMatches) {
// Skip this whole test if the csharp directory doesn't exist (i.e., a C++11
// only distribution).
string descriptor_file_name =
"../csharp/src/Google.Protobuf/Reflection/Descriptor.cs";
if (!File::Exists(TestSourceDir() + "/" + descriptor_file_name)) {
return;
}
MockErrorCollector error_collector;
DiskSourceTree source_tree;
Importer importer(&source_tree, &error_collector);

View file

@ -55,6 +55,13 @@
#include <google/protobuf/stubs/substitute.h>
#include <gtest/gtest.h>
#ifdef major
#undef major
#endif
#ifdef minor
#undef minor
#endif
namespace google {
namespace protobuf {
namespace compiler {

View file

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#if 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.

View file

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#if 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.

View file

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#if 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.

View file

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#if 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.

View file

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#if 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.

View file

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#if 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.

View file

@ -74,7 +74,7 @@ inline Arena* GetArena(MessageLite* msg, int64 arena_offset) {
template <typename Type>
inline Type* AddField(MessageLite* msg, int64 offset) {
#if LANG_CXX11
static_assert(std::is_trivially_copy_assignable<Type>::value,
static_assert(google::protobuf::internal::has_trivial_copy<Type>::value,
"Do not assign");
#endif
@ -94,7 +94,7 @@ inline string* AddField<string>(MessageLite* msg, int64 offset) {
template <typename Type>
inline void AddField(MessageLite* msg, int64 offset, Type value) {
#if LANG_CXX11
static_assert(std::is_trivially_copy_assignable<Type>::value,
static_assert(google::protobuf::internal::has_trivial_copy<Type>::value,
"Do not assign");
#endif
*AddField<Type>(msg, offset) = value;
@ -118,7 +118,7 @@ template <typename Type>
inline void SetField(MessageLite* msg, uint32* has_bits, uint32 has_bit_index,
int64 offset, Type value) {
#if LANG_CXX11
static_assert(std::is_trivially_copy_assignable<Type>::value,
static_assert(google::protobuf::internal::has_trivial_copy<Type>::value,
"Do not assign");
#endif
*MutableField<Type>(msg, has_bits, has_bit_index, offset) = value;

View file

@ -100,7 +100,7 @@ namespace internal {
// choose 16 rather than some other number just in case the compiler would
// be confused by an unaligned pointer.
#define GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TYPE, FIELD) \
static_cast<int>( \
static_cast< ::google::protobuf::uint32>( \
reinterpret_cast<const char*>( \
&reinterpret_cast<const TYPE*>(16)->FIELD) - \
reinterpret_cast<const char*>(16))

View file

@ -167,7 +167,8 @@ class InternalMetadataWithArenaLite
InternalMetadataWithArenaLite() {}
explicit InternalMetadataWithArenaLite(Arena* arena)
: InternalMetadataWithArenaBase(arena) {}
: InternalMetadataWithArenaBase<string,
InternalMetadataWithArenaLite>(arena) {}
void DoSwap(string* other) {
mutable_unknown_fields()->swap(*other);

View file

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#if 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.

View file

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#if 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.

View file

@ -96,7 +96,7 @@ namespace internal {
// The current version, represented as a single integer to make comparison
// easier: major * 10^6 + minor * 10^3 + micro
#define GOOGLE_PROTOBUF_VERSION 3003000
#define GOOGLE_PROTOBUF_VERSION 3003001
// A suffix string for alpha, beta or rc releases. Empty for stable releases.
#define GOOGLE_PROTOBUF_VERSION_SUFFIX ""

View file

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#if 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.

View file

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#if 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.

View file

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#if 3003001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.

View file

@ -545,16 +545,51 @@ build_php7.0_mac() {
popd
}
build_php7.1() {
use_php 7.1
pushd php
rm -rf vendor
cp -r /usr/local/vendor-7.1 vendor
wget https://phar.phpunit.de/phpunit-5.6.0.phar -O /usr/bin/phpunit
phpunit
popd
pushd conformance
# TODO(teboring): Add it back
# make test_php
popd
}
build_php7.1_c() {
use_php 7.1
wget https://phar.phpunit.de/phpunit-5.6.0.phar -O /usr/bin/phpunit
cd php/tests && /bin/bash ./test.sh && cd ../..
pushd conformance
# make test_php_c
popd
}
build_php7.1_zts_c() {
use_php_zts 7.1
wget https://phar.phpunit.de/phpunit-5.6.0.phar -O /usr/bin/phpunit
cd php/tests && /bin/bash ./test.sh && cd ../..
pushd conformance
# make test_php_c
popd
}
build_php_all() {
build_php5.5
build_php5.6
build_php7.0
build_php7.1
build_php5.5_c
build_php5.6_c
build_php7.0_c
build_php7.1_c
build_php5.5_zts_c
build_php5.6_zts_c
build_php7.0_zts_c
build_php7.1_zts_c
}
# Note: travis currently does not support testing more than one language so the
@ -595,6 +630,8 @@ Usage: $0 { cpp |
php5.6_c |
php7.0 |
php7.0_c |
php7.1 |
php7.1_c |
php_all)
"
exit 1