Update version to 3.11.0-RC0
diff --git a/Protobuf-C++.podspec b/Protobuf-C++.podspec index 6cb72b8..d21d3cc 100644 --- a/Protobuf-C++.podspec +++ b/Protobuf-C++.podspec
@@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'Protobuf-C++' - s.version = '3.10.0' + s.version = '3.11.0-rc0' s.summary = 'Protocol Buffers v3 runtime library for C++.' s.homepage = 'https://github.com/google/protobuf' s.license = '3-Clause BSD License'
diff --git a/Protobuf-C++.podspec.orig b/Protobuf-C++.podspec.orig deleted file mode 100644 index c820e14..0000000 --- a/Protobuf-C++.podspec.orig +++ /dev/null
@@ -1,46 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'Protobuf-C++' -<<<<<<< HEAD - s.version = '3.10.0-rc0' -======= - s.version = '3.10.0' ->>>>>>> 3.10.x - s.summary = 'Protocol Buffers v3 runtime library for C++.' - s.homepage = 'https://github.com/google/protobuf' - s.license = '3-Clause BSD License' - s.authors = { 'The Protocol Buffers contributors' => 'protobuf@googlegroups.com' } - s.cocoapods_version = '>= 1.0' - - s.source = { :git => 'https://github.com/google/protobuf.git', - :tag => "v#{s.version}" } - - s.source_files = 'src/google/protobuf/*.{h,cc,inc}', - 'src/google/protobuf/stubs/*.{h,cc}', - 'src/google/protobuf/io/*.{h,cc}', - 'src/google/protobuf/util/*.{h,cc}', - 'src/google/protobuf/util/internal/*.{h,cc}' - - # Excluding all the tests in the directories above - s.exclude_files = 'src/google/**/*_test.{h,cc,inc}', - 'src/google/**/*_unittest.{h,cc}', - 'src/google/protobuf/test_util*.{h,cc}', - 'src/google/protobuf/map_lite_test_util.{h,cc}', - 'src/google/protobuf/map_test_util*.{h,cc,inc}' - - s.header_mappings_dir = 'src' - - s.ios.deployment_target = '7.0' - s.osx.deployment_target = '10.9' - s.tvos.deployment_target = '9.0' - s.watchos.deployment_target = '2.0' - - s.pod_target_xcconfig = { - # Do not let src/google/protobuf/stubs/time.h override system API - 'USE_HEADERMAP' => 'NO', - 'ALWAYS_SEARCH_USER_PATHS' => 'NO', - - # Configure tool is not being used for Xcode. When building, assume pthread is supported. - 'GCC_PREPROCESSOR_DEFINITIONS' => '"$(inherited)" "HAVE_PTHREAD=1"', - } - -end
diff --git a/Protobuf.podspec b/Protobuf.podspec index 4726206..11d0963 100644 --- a/Protobuf.podspec +++ b/Protobuf.podspec
@@ -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.10.0' + s.version = '3.11.0-rc0' s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.' s.homepage = 'https://github.com/protocolbuffers/protobuf' s.license = '3-Clause BSD License'
diff --git a/Protobuf.podspec.orig b/Protobuf.podspec.orig deleted file mode 100644 index 7171f3f..0000000 --- a/Protobuf.podspec.orig +++ /dev/null
@@ -1,47 +0,0 @@ -# This file describes to Cocoapods how to integrate the Objective-C runtime into a dependent -# project. -# Despite this file being specific to Objective-C, it needs to be on the root of the repository. -# Otherwise, Cocoapods gives trouble like not picking up the license file correctly, or not letting -# dependent projects use the :git notation to refer to the library. -Pod::Spec.new do |s| - s.name = 'Protobuf' -<<<<<<< HEAD - s.version = '3.10.0-rc0' -======= - s.version = '3.10.0' ->>>>>>> 3.10.x - s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.' - s.homepage = 'https://github.com/protocolbuffers/protobuf' - s.license = '3-Clause BSD License' - s.authors = { 'The Protocol Buffers contributors' => 'protobuf@googlegroups.com' } - s.cocoapods_version = '>= 1.0' - - s.module_name = 'protobuf' - s.source = { :git => 'https://github.com/protocolbuffers/protobuf.git', - :tag => "v#{s.version}" } - - s.source_files = 'objectivec/*.{h,m}', - 'objectivec/google/protobuf/Any.pbobjc.{h,m}', - 'objectivec/google/protobuf/Api.pbobjc.{h,m}', - 'objectivec/google/protobuf/Duration.pbobjc.{h,m}', - 'objectivec/google/protobuf/Empty.pbobjc.{h,m}', - 'objectivec/google/protobuf/FieldMask.pbobjc.{h,m}', - 'objectivec/google/protobuf/SourceContext.pbobjc.{h,m}', - 'objectivec/google/protobuf/Struct.pbobjc.{h,m}', - 'objectivec/google/protobuf/Timestamp.pbobjc.{h,m}', - 'objectivec/google/protobuf/Type.pbobjc.{h,m}', - 'objectivec/google/protobuf/Wrappers.pbobjc.{h,m}' - # The following would cause duplicate symbol definitions. GPBProtocolBuffers is expected to be - # left out, as it's an umbrella implementation file. - s.exclude_files = 'objectivec/GPBProtocolBuffers.m' - - # Set a CPP symbol so the code knows to use framework imports. - s.user_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1' } - s.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1' } - - s.ios.deployment_target = '7.0' - s.osx.deployment_target = '10.9' - s.tvos.deployment_target = '9.0' - s.watchos.deployment_target = '2.0' - s.requires_arc = false -end
diff --git a/configure.ac b/configure.ac index fdc155e..f741fec 100644 --- a/configure.ac +++ b/configure.ac
@@ -17,7 +17,7 @@ # 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.10.0],[protobuf@googlegroups.com],[protobuf]) +AC_INIT([Protocol Buffers],[3.11.0-rc-0],[protobuf@googlegroups.com],[protobuf]) AM_MAINTAINER_MODE([enable])
diff --git a/configure.ac.orig b/configure.ac.orig deleted file mode 100644 index fe18bd8..0000000 --- a/configure.ac.orig +++ /dev/null
@@ -1,238 +0,0 @@ -## Process this file with autoconf to produce configure. -## In general, the safest way to proceed is to run ./autogen.sh - -AC_PREREQ(2.59) - -# Note: If you change the version, you must also update it in: -# * Protobuf.podspec -# * csharp/Google.Protobuf.Tools.nuspec -# * csharp/src/*/AssemblyInfo.cs -# * csharp/src/Google.Protobuf/Google.Protobuf.nuspec -# * java/*/pom.xml -# * python/google/protobuf/__init__.py -# * protoc-artifacts/pom.xml -# * src/google/protobuf/stubs/common.h -# * src/Makefile.am (Update -version-info for LDFLAGS if needed) -# -# 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.) -<<<<<<< HEAD -AC_INIT([Protocol Buffers],[3.10.0-rc-0],[protobuf@googlegroups.com],[protobuf]) -======= -AC_INIT([Protocol Buffers],[3.10.0],[protobuf@googlegroups.com],[protobuf]) ->>>>>>> 3.10.x - -AM_MAINTAINER_MODE([enable]) - -AC_CONFIG_SRCDIR(src/google/protobuf/message.cc) -# The config file is generated but not used by the source code, since we only -# need very few of them, e.g. HAVE_PTHREAD and HAVE_ZLIB. Those macros are -# passed down in CXXFLAGS manually in src/Makefile.am -AC_CONFIG_HEADERS([config.h]) -AC_CONFIG_MACRO_DIR([m4]) - -AC_ARG_VAR(DIST_LANG, [language to include in the distribution package (i.e., make dist)]) -case "$DIST_LANG" in - "") DIST_LANG=all ;; - all | cpp | csharp | java | python | javanano | objectivec | ruby | js | php) ;; - *) AC_MSG_FAILURE([unknown language: $DIST_LANG]) ;; -esac -AC_SUBST(DIST_LANG) - -# autoconf's default CXXFLAGS are usually "-g -O2". These aren't necessarily -# the best choice for libprotobuf. -AS_IF([test "x${ac_cv_env_CFLAGS_set}" = "x"], - [CFLAGS=""]) -AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"], - [CXXFLAGS=""]) - -AC_CANONICAL_TARGET - -AM_INIT_AUTOMAKE([1.9 tar-ustar subdir-objects]) - -# Silent rules enabled: the output is minimal but informative. -# In particular, the warnings from the compiler stick out very clearly. -# To see all logs, use the --disable-silent-rules on configure or via make V=1 -AM_SILENT_RULES([yes]) - -AC_ARG_WITH([zlib], - [AS_HELP_STRING([--with-zlib], - [include classes for streaming compressed data in and out @<:@default=check@:>@])], - [],[with_zlib=check]) - -AC_ARG_WITH([zlib-include], - [AS_HELP_STRING([--with-zlib-include=PATH], - [zlib include directory])], - [CPPFLAGS="-I$withval $CPPFLAGS"]) - -AC_ARG_WITH([zlib-lib], - [AS_HELP_STRING([--with-zlib-lib=PATH], - [zlib lib directory])], - [LDFLAGS="-L$withval $LDFLAGS"]) - -AC_ARG_WITH([protoc], - [AS_HELP_STRING([--with-protoc=COMMAND], - [use the given protoc command instead of building a new one when building tests (useful for cross-compiling)])], - [],[with_protoc=no]) - -# Checks for programs. -AC_PROG_CC -AC_PROG_CXX -AC_PROG_CXX_FOR_BUILD -AC_LANG([C++]) -ACX_USE_SYSTEM_EXTENSIONS -m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) -AM_CONDITIONAL(GCC, test "$GCC" = yes) # let the Makefile know if we're gcc -AC_PROG_OBJC - -# test_util.cc takes forever to compile with GCC and optimization turned on. -AC_MSG_CHECKING([C++ compiler flags...]) -AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"],[ - AS_IF([test "$GCC" = "yes"],[ - PROTOBUF_OPT_FLAG="-O2" - CXXFLAGS="${CXXFLAGS} -g" - ]) - - # Protocol Buffers contains several checks that are intended to be used only - # for debugging and which might hurt performance. Most users are probably - # end users who don't want these checks, so add -DNDEBUG by default. - CXXFLAGS="$CXXFLAGS -std=c++11 -DNDEBUG" - - AC_MSG_RESULT([use default: $PROTOBUF_OPT_FLAG $CXXFLAGS]) -],[ - AC_MSG_RESULT([use user-supplied: $CXXFLAGS]) -]) - -AC_SUBST(PROTOBUF_OPT_FLAG) - -ACX_CHECK_SUNCC - -# Have to do libtool after SUNCC, other wise it "helpfully" adds Crun Cstd -# to the link -AC_PROG_LIBTOOL - -# Check whether the linker supports version scripts -AC_MSG_CHECKING([whether the linker supports version scripts]) -save_LDFLAGS=$LDFLAGS -LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map" -cat > conftest.map <<EOF -{ - global: - main; - local: - *; -}; -EOF -AC_LINK_IFELSE( - [AC_LANG_SOURCE([int main() { return 0; }])], - [have_ld_version_script=yes; AC_MSG_RESULT(yes)], - [have_ld_version_script=no; AC_MSG_RESULT(no)]) -LDFLAGS=$save_LDFLAGS -AM_CONDITIONAL([HAVE_LD_VERSION_SCRIPT], [test "$have_ld_version_script" == "yes"]) - -# Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h stdlib.h unistd.h]) - -# Checks for library functions. -AC_FUNC_MEMCMP -AC_FUNC_STRTOD -AC_CHECK_FUNCS([ftruncate memset mkdir strchr strerror strtol]) - -# Check for zlib. -HAVE_ZLIB=0 -AS_IF([test "$with_zlib" != no], [ - AC_MSG_CHECKING([zlib version]) - - # First check the zlib header version. - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[ - #include <zlib.h> - #if !defined(ZLIB_VERNUM) || (ZLIB_VERNUM < 0x1204) - # error zlib version too old - #endif - ]], [])], [ - AC_MSG_RESULT([ok (1.2.0.4 or later)]) - - # Also need to add -lz to the linker flags and make sure this succeeds. - AC_SEARCH_LIBS([zlibVersion], [z], [ - AC_DEFINE([HAVE_ZLIB], [1], [Enable classes using zlib compression.]) - HAVE_ZLIB=1 - ], [ - AS_IF([test "$with_zlib" != check], [ - AC_MSG_FAILURE([--with-zlib was given, but no working zlib library was found]) - ]) - ]) - ], [ - AS_IF([test "$with_zlib" = check], [ - AC_MSG_RESULT([headers missing or too old (requires 1.2.0.4)]) - ], [ - AC_MSG_FAILURE([--with-zlib was given, but zlib headers were not present or were too old (requires 1.2.0.4)]) - ]) - ]) -]) -AM_CONDITIONAL([HAVE_ZLIB], [test $HAVE_ZLIB = 1]) - -# Add -std=c++11 if necesssary. It is important for us to do this before the -# libatomic check below, since that also depends on C++11. -AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory]) - -dnl On some platforms, std::atomic needs a helper library -AC_MSG_CHECKING(whether -latomic is needed) -AC_LINK_IFELSE([AC_LANG_SOURCE([[ - #include <atomic> - #include <cstdint> - std::atomic<std::int64_t> v; - int main() { - return v; - } -]])], STD_ATOMIC_NEED_LIBATOMIC=no, STD_ATOMIC_NEED_LIBATOMIC=yes) -AC_MSG_RESULT($STD_ATOMIC_NEED_LIBATOMIC) -if test "x$STD_ATOMIC_NEED_LIBATOMIC" = xyes; then - LIBATOMIC_LIBS="-latomic" -fi -AC_SUBST([LIBATOMIC_LIBS]) - -AS_IF([test "$with_protoc" != "no"], [ - PROTOC=$with_protoc - AS_IF([test "$with_protoc" = "yes"], [ - # No argument given. Use system protoc. - PROTOC=protoc - ]) - AS_IF([echo "$PROTOC" | grep -q '^@<:@^/@:>@.*/'], [ - # Does not start with a slash, but contains a slash. So, it's a relative - # path (as opposed to an absolute path or an executable in $PATH). - # Since it will actually be executed from the src directory, prefix with - # the current directory. We also insert $ac_top_build_prefix in case this - # is a nested package and --with-protoc was actually given on the outer - # package's configure script. - PROTOC=`pwd`/${ac_top_build_prefix}$PROTOC - ]) - AC_SUBST([PROTOC]) -]) -AM_CONDITIONAL([USE_EXTERNAL_PROTOC], [test "$with_protoc" != "no"]) - -AX_PTHREAD -AM_CONDITIONAL([HAVE_PTHREAD], [test "x$ax_pthread_ok" = "xyes"]) -# We still keep this for improving pbconfig.h for unsupported platforms. -AC_CXX_STL_HASH - -# Enable ObjC support for conformance directory on OS X. -OBJC_CONFORMANCE_TEST=0 -case "$target_os" in - darwin*) - OBJC_CONFORMANCE_TEST=1 - ;; -esac -AM_CONDITIONAL([OBJC_CONFORMANCE_TEST], [test $OBJC_CONFORMANCE_TEST = 1]) - -# HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS, -# since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock -# too. -export CFLAGS -export CXXFLAGS -AC_CONFIG_SUBDIRS([third_party/googletest]) - -AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc]) -AC_OUTPUT
diff --git a/csharp/Google.Protobuf.Tools.nuspec b/csharp/Google.Protobuf.Tools.nuspec index 2bcf1d1..9357025 100644 --- a/csharp/Google.Protobuf.Tools.nuspec +++ b/csharp/Google.Protobuf.Tools.nuspec
@@ -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.10.0</version> + <version>3.11.0-rc0</version> <authors>Google Inc.</authors> <owners>protobuf-packages</owners> <licenseUrl>https://github.com/protocolbuffers/protobuf/blob/master/LICENSE</licenseUrl>
diff --git a/csharp/Google.Protobuf.Tools.nuspec.orig b/csharp/Google.Protobuf.Tools.nuspec.orig deleted file mode 100644 index dea09e7..0000000 --- a/csharp/Google.Protobuf.Tools.nuspec.orig +++ /dev/null
@@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<package> - <metadata> - <id>Google.Protobuf.Tools</id> - <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> -<<<<<<< HEAD - <version>3.10.0-rc0</version> -======= - <version>3.10.0</version> ->>>>>>> 3.10.x - <authors>Google Inc.</authors> - <owners>protobuf-packages</owners> - <licenseUrl>https://github.com/protocolbuffers/protobuf/blob/master/LICENSE</licenseUrl> - <projectUrl>https://github.com/protocolbuffers/protobuf</projectUrl> - <requireLicenseAcceptance>false</requireLicenseAcceptance> - <releaseNotes>Tools for Protocol Buffers</releaseNotes> - <copyright>Copyright 2015, Google Inc.</copyright> - <tags>Protocol Buffers Binary Serialization Format Google proto proto3</tags> - </metadata> - <files> - <file src="protoc\windows_x86\protoc.exe" target="tools\windows_x86\protoc.exe"/> - <file src="protoc\windows_x64\protoc.exe" target="tools\windows_x64\protoc.exe"/> - <file src="protoc\linux_x86\protoc" target="tools\linux_x86\protoc"/> - <file src="protoc\linux_x64\protoc" target="tools\linux_x64\protoc"/> - <file src="protoc\macosx_x86\protoc" target="tools\macosx_x86\protoc"/> - <file src="protoc\macosx_x64\protoc" target="tools\macosx_x64\protoc"/> - <file src="..\src\google\protobuf\any.proto" target="tools\google\protobuf"/> - <file src="..\src\google\protobuf\api.proto" target="tools\google\protobuf"/> - <file src="..\src\google\protobuf\descriptor.proto" target="tools\google\protobuf"/> - <file src="..\src\google\protobuf\duration.proto" target="tools\google\protobuf"/> - <file src="..\src\google\protobuf\empty.proto" target="tools\google\protobuf"/> - <file src="..\src\google\protobuf\field_mask.proto" target="tools\google\protobuf"/> - <file src="..\src\google\protobuf\source_context.proto" target="tools\google\protobuf"/> - <file src="..\src\google\protobuf\struct.proto" target="tools\google\protobuf"/> - <file src="..\src\google\protobuf\timestamp.proto" target="tools\google\protobuf"/> - <file src="..\src\google\protobuf\type.proto" target="tools\google\protobuf"/> - <file src="..\src\google\protobuf\wrappers.proto" target="tools\google\protobuf"/> - <file src="Google.Protobuf.Tools.targets" target="buildCrossTargeting"/> - <file src="Google.Protobuf.Tools.targets" target="build"/> - </files> -</package>
diff --git a/csharp/src/Google.Protobuf/Google.Protobuf.csproj b/csharp/src/Google.Protobuf/Google.Protobuf.csproj index b81dd12..a81a52f 100644 --- a/csharp/src/Google.Protobuf/Google.Protobuf.csproj +++ b/csharp/src/Google.Protobuf/Google.Protobuf.csproj
@@ -4,7 +4,7 @@ <Description>C# runtime library for Protocol Buffers - Google's data interchange format.</Description> <Copyright>Copyright 2015, Google Inc.</Copyright> <AssemblyTitle>Google Protocol Buffers</AssemblyTitle> - <VersionPrefix>3.10.0</VersionPrefix> + <VersionPrefix>3.11.0-rc0</VersionPrefix> <LangVersion>6</LangVersion> <Authors>Google Inc.</Authors> <TargetFrameworks>netstandard1.0;netstandard2.0;net45</TargetFrameworks>
diff --git a/csharp/src/Google.Protobuf/Google.Protobuf.csproj.orig b/csharp/src/Google.Protobuf/Google.Protobuf.csproj.orig deleted file mode 100644 index 8b31c2c..0000000 --- a/csharp/src/Google.Protobuf/Google.Protobuf.csproj.orig +++ /dev/null
@@ -1,46 +0,0 @@ -<Project Sdk="Microsoft.NET.Sdk"> - - <PropertyGroup> - <Description>C# runtime library for Protocol Buffers - Google's data interchange format.</Description> - <Copyright>Copyright 2015, Google Inc.</Copyright> - <AssemblyTitle>Google Protocol Buffers</AssemblyTitle> -<<<<<<< HEAD - <VersionPrefix>3.10.0-rc0</VersionPrefix> -======= - <VersionPrefix>3.10.0</VersionPrefix> ->>>>>>> 3.10.x - <LangVersion>6</LangVersion> - <Authors>Google Inc.</Authors> - <TargetFrameworks>netstandard1.0;netstandard2.0;net45</TargetFrameworks> - <GenerateDocumentationFile>true</GenerateDocumentationFile> - <AssemblyOriginatorKeyFile>../../keys/Google.Protobuf.snk</AssemblyOriginatorKeyFile> - <SignAssembly>true</SignAssembly> - <PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign> - <PackageTags>Protocol;Buffers;Binary;Serialization;Format;Google;proto;proto3</PackageTags> - <PackageReleaseNotes>C# proto3 support</PackageReleaseNotes> - <PackageProjectUrl>https://github.com/protocolbuffers/protobuf</PackageProjectUrl> - <PackageLicenseUrl>https://github.com/protocolbuffers/protobuf/blob/master/LICENSE</PackageLicenseUrl> - <RepositoryType>git</RepositoryType> - <RepositoryUrl>https://github.com/protocolbuffers/protobuf.git</RepositoryUrl> - <!-- Include PDB in the built .nupkg --> - <AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder> - </PropertyGroup> - - <PropertyGroup Condition=" '$(TargetFramework)' == 'net45' or '$(TargetFramework)' == 'netstandard2.0' "> - <DefineConstants>$(DefineConstants);GOOGLE_PROTOBUF_SUPPORT_SYSTEM_MEMORY</DefineConstants> - </PropertyGroup> - - <!-- Needed for the net45 build to work on Unix. See https://github.com/dotnet/designs/pull/33 --> - <ItemGroup> - <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0-preview.2"/> - </ItemGroup> - - <ItemGroup Condition=" '$(TargetFramework)' == 'net45' or '$(TargetFramework)' == 'netstandard2.0' "> - <PackageReference Include="System.Memory" Version="4.5.2"/> - </ItemGroup> - - <ItemGroup> - <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" Version="1.0.0-beta2-18618-05"/> - </ItemGroup> - -</Project>
diff --git a/java/bom/pom.xml b/java/bom/pom.xml index 919a0ad..06dbfa6 100644 --- a/java/bom/pom.xml +++ b/java/bom/pom.xml
@@ -4,7 +4,7 @@ <groupId>com.google.protobuf</groupId> <artifactId>protobuf-bom</artifactId> - <version>3.10.0</version> + <version>3.11.0-rc-0</version> <packaging>pom</packaging> <name>Protocol Buffers [BOM]</name>
diff --git a/java/bom/pom.xml.orig b/java/bom/pom.xml.orig deleted file mode 100644 index 7158468..0000000 --- a/java/bom/pom.xml.orig +++ /dev/null
@@ -1,114 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <groupId>com.google.protobuf</groupId> - <artifactId>protobuf-bom</artifactId> -<<<<<<< HEAD - <version>3.10.0-rc-0</version> -======= - <version>3.10.0</version> ->>>>>>> 3.10.x - <packaging>pom</packaging> - - <name>Protocol Buffers [BOM]</name> - <description>A compatible set of open source libraries for working with protocol buffers.</description> - <url>https://developers.google.com/protocol-buffers/</url> - - <organization> - <name>Google LLC</name> - <url>https://cloud.google.com</url> - </organization> - - <developers> - <developer> - <id>haon</id> - <name>Hao Nguyen</name> - <email>haon@google.com</email> - <organization>Google</organization> - <organizationUrl>https://cloud.google.com</organizationUrl> - <timezone>America/Los_Angeles</timezone> - </developer> - </developers> - - <licenses> - <license> - <name>The Apache License, Version 2.0</name> - <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> - </license> - </licenses> - - <scm> - <url>https://github.com/protocolbuffers/protobuf</url> - <connection>scm:git:https://github.com/protocolbuffers/protobuf.git</connection> - </scm> - - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - </properties> - - <distributionManagement> - <snapshotRepository> - <id>sonatype-nexus-staging</id> - <url>https://oss.sonatype.org/content/repositories/snapshots</url> - </snapshotRepository> - <repository> - <id>sonatype-nexus-staging</id> - <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> - </repository> - </distributionManagement> - - <dependencyManagement> - <dependencies> - <dependency> - <groupId>com.google.protobuf</groupId> - <artifactId>protobuf-java</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>com.google.protobuf</groupId> - <artifactId>protobuf-java-util</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - </dependencyManagement> - - <profiles> - <profile> - <!-- If you see the error message - gpg: signing failed: Inappropriate ioctl for device - when signing run the command - export GPG_TTY=$(tty) - and try again. --> - <id>release</id> - <build> - <plugins> - <plugin> - <artifactId>maven-gpg-plugin</artifactId> - <version>1.6</version> - <executions> - <execution> - <id>sign-artifacts</id> - <phase>verify</phase> - <goals> - <goal>sign</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.sonatype.plugins</groupId> - <artifactId>nexus-staging-maven-plugin</artifactId> - <version>1.6.6</version> - <extensions>true</extensions> - <configuration> - <nexusUrl>https://oss.sonatype.org/</nexusUrl> - <serverId>sonatype-nexus-staging</serverId> - <autoReleaseAfterClose>false</autoReleaseAfterClose> - </configuration> - </plugin> - </plugins> - </build> - </profile> - </profiles> -</project>
diff --git a/java/core/pom.xml b/java/core/pom.xml index cc35abc..2bb1ba4 100644 --- a/java/core/pom.xml +++ b/java/core/pom.xml
@@ -4,7 +4,7 @@ <parent> <groupId>com.google.protobuf</groupId> <artifactId>protobuf-parent</artifactId> - <version>3.10.0</version> + <version>3.11.0-rc-0</version> </parent> <artifactId>protobuf-java</artifactId>
diff --git a/java/core/pom.xml.orig b/java/core/pom.xml.orig deleted file mode 100644 index 6dface9..0000000 --- a/java/core/pom.xml.orig +++ /dev/null
@@ -1,162 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>com.google.protobuf</groupId> - <artifactId>protobuf-parent</artifactId> -<<<<<<< HEAD - <version>3.10.0-rc-0</version> -======= - <version>3.10.0</version> ->>>>>>> 3.10.x - </parent> - - <artifactId>protobuf-java</artifactId> - <packaging>bundle</packaging> - - <name>Protocol Buffers [Core]</name> - <description> - Core Protocol Buffers library. Protocol Buffers are a way of encoding structured data in an - efficient yet extensible format. - </description> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.easymock</groupId> - <artifactId>easymock</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.easymock</groupId> - <artifactId>easymockclassextension</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.google.guava</groupId> - <artifactId>guava</artifactId> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <!-- Include core protos in the bundle as resources --> - <resources> - <resource> - <directory>${protobuf.source.dir}</directory> - <includes> - <include>google/protobuf/any.proto</include> - <include>google/protobuf/api.proto</include> - <include>google/protobuf/descriptor.proto</include> - <include>google/protobuf/duration.proto</include> - <include>google/protobuf/empty.proto</include> - <include>google/protobuf/field_mask.proto</include> - <include>google/protobuf/source_context.proto</include> - <include>google/protobuf/struct.proto</include> - <include>google/protobuf/timestamp.proto</include> - <include>google/protobuf/type.proto</include> - <include>google/protobuf/wrappers.proto</include> - <include>google/protobuf/compiler/plugin.proto</include> - </includes> - </resource> - </resources> - <testResources> - <testResource> - <directory>${protobuf.source.dir}</directory> - <includes> - <include>google/protobuf/testdata/golden_message_oneof_implemented</include> - <include>google/protobuf/testdata/golden_packed_fields_message</include> - </includes> - </testResource> - </testResources> - - <plugins> - <!-- Use Antrun plugin to generate sources with protoc --> - <plugin> - <artifactId>maven-antrun-plugin</artifactId> - <executions> - <!-- Generate core protos --> - <execution> - <id>generate-sources</id> - <phase>generate-sources</phase> - <configuration> - <target> - <ant antfile="generate-sources-build.xml"/> - </target> - </configuration> - <goals> - <goal>run</goal> - </goals> - </execution> - - <!-- Generate the test protos --> - <execution> - <id>generate-test-sources</id> - <phase>generate-test-sources</phase> - <configuration> - <target> - <ant antfile="generate-test-sources-build.xml"/> - </target> - </configuration> - <goals> - <goal>run</goal> - </goals> - </execution> - </executions> - </plugin> - - <!-- Add the generated sources to the build --> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <executions> - <execution> - <id>add-generated-sources</id> - <phase>generate-sources</phase> - <goals> - <goal>add-source</goal> - </goals> - <configuration> - <sources> - <source>${generated.sources.dir}</source> - </sources> - </configuration> - </execution> - <execution> - <id>add-generated-test-sources</id> - <phase>generate-test-sources</phase> - <goals> - <goal>add-test-source</goal> - </goals> - <configuration> - <sources> - <source>${generated.testsources.dir}</source> - </sources> - </configuration> - </execution> - </executions> - </plugin> - - <!-- OSGI bundle configuration --> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <extensions>true</extensions> - <configuration> - <instructions> - <Automatic-Module-Name>com.google.protobuf</Automatic-Module-Name> <!-- Java9+ Jigsaw module name --> - <Bundle-DocURL>https://developers.google.com/protocol-buffers/</Bundle-DocURL> - <Bundle-SymbolicName>com.google.protobuf</Bundle-SymbolicName> - <Export-Package>com.google.protobuf;version=${project.version}</Export-Package> - <Import-Package>sun.misc;resolution:=optional,*</Import-Package> - </instructions> - </configuration> - </plugin> - </plugins> - </build> - -</project>
diff --git a/java/lite/pom.xml b/java/lite/pom.xml index 5d2e760..3f45a17 100644 --- a/java/lite/pom.xml +++ b/java/lite/pom.xml
@@ -4,7 +4,7 @@ <parent> <groupId>com.google.protobuf</groupId> <artifactId>protobuf-parent</artifactId> - <version>3.10.0</version> + <version>3.11.0-rc-0</version> </parent> <artifactId>protobuf-javalite</artifactId>
diff --git a/java/pom.xml b/java/pom.xml index c5f16f7..337a56a 100644 --- a/java/pom.xml +++ b/java/pom.xml
@@ -4,7 +4,7 @@ <groupId>com.google.protobuf</groupId> <artifactId>protobuf-parent</artifactId> - <version>3.10.0</version> + <version>3.11.0-rc-0</version> <packaging>pom</packaging> <name>Protocol Buffers [Parent]</name>
diff --git a/java/util/pom.xml b/java/util/pom.xml index d9b0a2e..f0777b9 100644 --- a/java/util/pom.xml +++ b/java/util/pom.xml
@@ -4,7 +4,7 @@ <parent> <groupId>com.google.protobuf</groupId> <artifactId>protobuf-parent</artifactId> - <version>3.10.0</version> + <version>3.11.0-rc-0</version> </parent> <artifactId>protobuf-java-util</artifactId>
diff --git a/java/util/pom.xml.orig b/java/util/pom.xml.orig deleted file mode 100644 index d33cbe3..0000000 --- a/java/util/pom.xml.orig +++ /dev/null
@@ -1,144 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>com.google.protobuf</groupId> - <artifactId>protobuf-parent</artifactId> -<<<<<<< HEAD - <version>3.10.0-rc-0</version> -======= - <version>3.10.0</version> ->>>>>>> 3.10.x - </parent> - - <artifactId>protobuf-java-util</artifactId> - <packaging>bundle</packaging> - - <name>Protocol Buffers [Util]</name> - <description>Utilities for Protocol Buffers</description> - - <dependencies> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>protobuf-java</artifactId> - </dependency> - <dependency> - <groupId>com.google.guava</groupId> - <artifactId>guava</artifactId> - </dependency> - <dependency> - <groupId>com.google.errorprone</groupId> - <artifactId>error_prone_annotations</artifactId> - <version>2.3.2</version> - </dependency> - <dependency> - <groupId>com.google.guava</groupId> - <artifactId>guava-testlib</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.8.5</version> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </dependency> - <dependency> - <groupId>org.easymock</groupId> - <artifactId>easymock</artifactId> - </dependency> - <dependency> - <groupId>org.easymock</groupId> - <artifactId>easymockclassextension</artifactId> - </dependency> - <dependency> - <groupId>com.google.truth</groupId> - <artifactId>truth</artifactId> - <scope>test</scope> - </dependency> - </dependencies> - - <properties> - <!-- Use the core proto dir so that we can call the core generation script --> - <test.proto.dir>../core/src/test/proto</test.proto.dir> - </properties> - - <build> - <plugins> - <plugin> - <artifactId>maven-antrun-plugin</artifactId> - <executions> - <!-- Generate the test protos --> - <execution> - <id>generate-test-sources</id> - <phase>generate-test-sources</phase> - <configuration> - <target> - <!-- Generate all of the test protos from the core module --> - <ant antfile="../core/generate-test-sources-build.xml"/> - - <!-- Generate additional test protos for this module --> - <exec executable="${protoc}"> - <arg value="--java_out=${generated.testsources.dir}"/> - <arg value="--proto_path=${protobuf.source.dir}"/> - <arg value="--proto_path=src/test/proto"/> - <arg value="src/test/proto/com/google/protobuf/util/json_test.proto"/> - </exec> - </target> - </configuration> - <goals> - <goal>run</goal> - </goals> - </execution> - </executions> - </plugin> - - <!-- Add the generated test sources to the build --> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <executions> - <execution> - <id>add-generated-test-sources</id> - <phase>generate-test-sources</phase> - <goals> - <goal>add-test-source</goal> - </goals> - <configuration> - <sources> - <source>${generated.testsources.dir}</source> - </sources> - </configuration> - </execution> - </executions> - </plugin> - - <!-- Configure the OSGI bundle --> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <extensions>true</extensions> - <configuration> - <instructions> - <Automatic-Module-Name>com.google.protobuf.util</Automatic-Module-Name> <!-- Java9+ Jigsaw module name --> - <Bundle-DocURL>https://developers.google.com/protocol-buffers/</Bundle-DocURL> - <Bundle-SymbolicName>com.google.protobuf.util</Bundle-SymbolicName> - <Export-Package>com.google.protobuf.util;version=${project.version}</Export-Package> - </instructions> - </configuration> - </plugin> - - <!-- Configure the fat jar to include all dependencies --> - <plugin> - <artifactId>maven-assembly-plugin</artifactId> - <configuration> - <descriptorRefs> - <descriptorRef>jar-with-dependencies</descriptorRef> - </descriptorRefs> - </configuration> - </plugin> - </plugins> - </build> -</project>
diff --git a/js/package.json b/js/package.json index 6f85241..c9ea4de 100644 --- a/js/package.json +++ b/js/package.json
@@ -1,6 +1,6 @@ { "name": "google-protobuf", - "version": "3.10.0", + "version": "3.11.0-rc.0", "description": "Protocol Buffers for JavaScript", "main": "google-protobuf.js", "files": [
diff --git a/js/package.json.orig b/js/package.json.orig deleted file mode 100644 index cd56998..0000000 --- a/js/package.json.orig +++ /dev/null
@@ -1,30 +0,0 @@ -{ - "name": "google-protobuf", -<<<<<<< HEAD - "version": "3.10.0-rc.0", -======= - "version": "3.10.0", ->>>>>>> 3.10.x - "description": "Protocol Buffers for JavaScript", - "main": "google-protobuf.js", - "files": [ - "google" - ], - "dependencies": {}, - "devDependencies": { - "glob": "~7.1.4", - "google-closure-compiler": "~20190819.0.0", - "google-closure-library": "~20190819.0.0", - "gulp": "~4.0.2", - "jasmine": "~3.4.0" - }, - "scripts": { - "test": "node ./node_modules/gulp/bin/gulp.js test" - }, - "repository": { - "type": "git", - "url": "https://github.com/protocolbuffers/protobuf/tree/master/js" - }, - "author": "Google Protocol Buffers Team", - "license": "BSD-3-Clause" -}
diff --git a/php/ext/google/protobuf/LICENSE b/php/ext/google/protobuf/LICENSE deleted file mode 100644 index 19b305b..0000000 --- a/php/ext/google/protobuf/LICENSE +++ /dev/null
@@ -1,32 +0,0 @@ -Copyright 2008 Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Code generated by the Protocol Buffer compiler is owned by the owner -of the input file used when generating it. This code is not -standalone and requires a support library to be linked with it. This -support library is itself covered by the above license.
diff --git a/php/ext/google/protobuf/package.xml b/php/ext/google/protobuf/package.xml index 21e82ce..ba2521c 100644 --- a/php/ext/google/protobuf/package.xml +++ b/php/ext/google/protobuf/package.xml
@@ -10,15 +10,15 @@ <email>protobuf-opensource@google.com</email> <active>yes</active> </lead> - <date>2019-09-12</date> - <time>13:48:02</time> + <date>2019-10-03</date> + <time>14:24:03</time> <version> - <release>3.10.0</release> - <api>3.10.0</api> + <release>3.11.0RC0</release> + <api>3.11.0</api> </version> <stability> - <release>stable</release> - <api>stable</api> + <release>beta</release> + <api>beta</api> </stability> <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license> <notes>GA release.</notes>
diff --git a/php/ext/google/protobuf/package.xml.orig b/php/ext/google/protobuf/package.xml.orig deleted file mode 100644 index f7be53d..0000000 --- a/php/ext/google/protobuf/package.xml.orig +++ /dev/null
@@ -1,442 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<package packagerversion="1.9.5" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd"> - <name>protobuf</name> - <channel>pecl.php.net</channel> - <summary>Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data.</summary> - <description>https://developers.google.com/protocol-buffers/</description> - <lead> - <name>Bo Yang</name> - <user>stanleycheung</user> - <email>protobuf-opensource@google.com</email> - <active>yes</active> - </lead> -<<<<<<< HEAD - <date>2019-09-17</date> - <time>16:00:29</time> - <version> - <release>3.10.0RC0</release> -======= - <date>2019-09-12</date> - <time>13:48:02</time> - <version> - <release>3.10.0</release> ->>>>>>> 3.10.x - <api>3.10.0</api> - </version> - <stability> - <release>beta</release> - <api>beta</api> - </stability> - <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license> - <notes>GA release.</notes> - <contents> - <dir baseinstalldir="/" name="/"> - <file baseinstalldir="/" name="config.m4" role="src"/> - <file baseinstalldir="/" name="array.c" role="src"/> - <file baseinstalldir="/" name="builtin_descriptors.inc" role="src"/> - <file baseinstalldir="/" name="def.c" role="src"/> - <file baseinstalldir="/" name="encode_decode.c" role="src"/> - <file baseinstalldir="/" name="map.c" role="src"/> - <file baseinstalldir="/" name="message.c" role="src"/> - <file baseinstalldir="/" name="protobuf.c" role="src"/> - <file baseinstalldir="/" name="protobuf.h" role="src"/> - <file baseinstalldir="/" name="storage.c" role="src"/> - <file baseinstalldir="/" name="type_check.c" role="src"/> - <file baseinstalldir="/" name="upb.c" role="src"/> - <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> - <required> - <php> - <min>5.5.9</min> - </php> - <pearinstaller> - <min>1.4.0</min> - </pearinstaller> - </required> - </dependencies> - <providesextension>protobuf</providesextension> - <extsrcrelease/> - <changelog> - <release> - <version> - <release>3.1.0a1</release> - <api>3.1.0a1</api> - </version> - <stability> - <release>alpha</release> - <api>alpha</api> - </stability> - <date>2016-09-23</date> - <time>16:06:07</time> - <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license> - <notes> -First alpha release - </notes> - </release> - <release> - <version> - <release>3.2.0a1</release> - <api>3.2.0a1</api> - </version> - <stability> - <release>alpha</release> - <api>alpha</api> - </stability> - <date>2017-01-13</date> - <time>16:06:07</time> - <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license> - <notes> -Second alpha release. - </notes> - </release> - <release> - <version> - <release>3.3.0</release> - <api>3.3.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2017-04-28</date> - <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> - <release> - <version> - <release>3.3.2</release> - <api>3.3.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2017-06-21</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> - <release> - <version> - <release>3.4.0</release> - <api>3.4.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2017-08-16</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> - <release> - <version> - <release>3.4.1</release> - <api>3.4.1</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2017-09-14</date> - <time>11:02: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.5.0</release> - <api>3.5.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2017-11-15</date> - <time>11:02: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.5.0.1</release> - <api>3.5.0.1</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2017-12-06</date> - <time>11:02: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.5.1</release> - <api>3.5.1</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2017-12-11</date> - <time>11:02: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.5.2</release> - <api>3.5.2</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2018-03-06</date> - <time>11:02:07</time> - <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license> - <notes> -G A release. - </notes> - </release> - <release> - <version> - <release>3.6.0</release> - <api>3.6.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2018-06-06</date> - <time>11:02:07</time> - <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license> - <notes> -G A release. - </notes> - </release> - <release> - <version> - <release>3.6.1</release> - <api>3.6.1</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2018-08-03</date> - <time>11:02:07</time> - <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license> - <notes> -G A release. - </notes> - </release> - <release> - <version> - <release>3.7.0RC2</release> - <api>3.7.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2019-02-1</date> - <time>10:22:43</time> - <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license> - <notes>GA release.</notes> - </release> - <release> - <version> - <release>3.7.0RC3</release> - <api>3.7.0</api> - </version> - <stability> - <release>beta</release> - <api>beta</api> - </stability> - <date>2019-02-22</date> - <time>11:31:21</time> - <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license> - <notes>GA release.</notes> - </release> - <release> - <version> - <release>3.7.0</release> - <api>3.7.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2019-02-28</date> - <time>10:19:15</time> - <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license> - <notes>GA release.</notes> - </release> - <release> - <version> - <release>3.7.1</release> - <api>3.7.1</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2019-03-25</date> - <time>13:23:39</time> - <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license> - <notes>GA release.</notes> - </release> - <release> - <version> - <release>3.8.0RC1</release> - <api>3.8.0</api> - </version> - <stability> - <release>beta</release> - <api>beta</api> - </stability> - <date>2019-04-23</date> - <time>16:14:52</time> - <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license> - <notes>GA release.</notes> - </release> - <release> - <version> - <release>3.8.0</release> - <api>3.8.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2019-05-21</date> - <time>14:07:13</time> - <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license> - <notes>GA release.</notes> - </release> - <release> - <version> - <release>3.9.0RC1</release> - <api>3.9.0</api> - </version> - <stability> - <release>beta</release> - <api>beta</api> - </stability> - <date>2019-06-17</date> - <time>09:34:50</time> - <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license> - <notes>GA release.</notes> - </release> - <release> - <version> - <release>3.9.0</release> - <api>3.9.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2019-07-10</date> - <time>16:50:08</time> - <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license> - <notes>GA release.</notes> - </release> - <release> - <version> - <release>3.9.1</release> - <api>3.9.1</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2019-08-02</date> - <time>15:59:08</time> - <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license> - <notes>GA release.</notes> - </release> - <release> - <version> - <release>3.10.0RC1</release> - <api>3.10.0</api> - </version> - <stability> - <release>beta</release> - <api>beta</api> - </stability> - <date>2019-09-04</date> - <time>13:24:25</time> - <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license> - <notes>GA release.</notes> - </release> - <release> - <version> - <release>3.10.0RC1</release> - <api>3.10.0</api> - </version> - <stability> - <release>beta</release> - <api>beta</api> - </stability> - <date>2019-09-05</date> - <time>10:12:46</time> - <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license> - <notes>GA release.</notes> - </release> - <release> - <version> - <release>3.10.0</release> - <api>3.10.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2019-09-12</date> - <time>13:48:02</time> - <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license> - <notes>GA release.</notes> - </release> - </changelog> -</package>
diff --git a/php/ext/google/protobuf/protobuf.h b/php/ext/google/protobuf/protobuf.h index 2ec3961..4abfecb 100644 --- a/php/ext/google/protobuf/protobuf.h +++ b/php/ext/google/protobuf/protobuf.h
@@ -37,7 +37,7 @@ #include "upb.h" #define PHP_PROTOBUF_EXTNAME "protobuf" -#define PHP_PROTOBUF_VERSION "3.10.0" +#define PHP_PROTOBUF_VERSION "3.11.0RC0" #define MAX_LENGTH_OF_INT64 20 #define SIZEOF_INT64 8
diff --git a/php/ext/google/protobuf/protobuf.h.orig b/php/ext/google/protobuf/protobuf.h.orig deleted file mode 100644 index 1169985..0000000 --- a/php/ext/google/protobuf/protobuf.h.orig +++ /dev/null
@@ -1,1523 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef __GOOGLE_PROTOBUF_PHP_PROTOBUF_H__ -#define __GOOGLE_PROTOBUF_PHP_PROTOBUF_H__ - -#include <php.h> - -// ubp.h has to be placed after php.h. Othwise, php.h will introduce NDEBUG. -#include "upb.h" - -#define PHP_PROTOBUF_EXTNAME "protobuf" -<<<<<<< HEAD -#define PHP_PROTOBUF_VERSION "3.10.0RC0" -======= -#define PHP_PROTOBUF_VERSION "3.10.0" ->>>>>>> 3.10.x - -#define MAX_LENGTH_OF_INT64 20 -#define SIZEOF_INT64 8 - -/* From Chromium. */ -#define ARRAY_SIZE(x) \ - ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x]))))) - -#define PHP_PROTO_UNUSED(var) (void)var -/* PHP_PROTO_ASSERT(): in release mode, we use the expression without letting - * it be evaluated. This prevents "unused variable" warnings. */ -#ifdef NDEBUG -#define PHP_PROTO_ASSERT(expr) do {} while (false && (expr)) -#else -#define PHP_PROTO_ASSERT(expr) assert(expr) -#endif - -// ----------------------------------------------------------------------------- -// PHP7 Wrappers -// ---------------------------------------------------------------------------- - -#if PHP_VERSION_ID < 70300 -#define GC_ADDREF(h) ++GC_REFCOUNT(h) -#define GC_DELREF(h) --GC_REFCOUNT(h) -#endif - -#if PHP_MAJOR_VERSION < 7 - -#define php_proto_zend_literal const zend_literal* -#define PHP_PROTO_CASE_IS_BOOL IS_BOOL -#define PHP_PROTO_SIZE int -#define PHP_PROTO_LONG long -#define PHP_PROTO_TSRMLS_DC TSRMLS_DC -#define PHP_PROTO_TSRMLS_CC TSRMLS_CC - -// PHP String - -#define PHP_PROTO_ZVAL_STRING(zval_ptr, s, copy) \ - ZVAL_STRING(zval_ptr, s, copy) -#define PHP_PROTO_ZVAL_STRINGL(zval_ptr, s, len, copy) \ - ZVAL_STRINGL(zval_ptr, s, len, copy) -#define PHP_PROTO_RETURN_STRING(s, copy) RETURN_STRING(s, copy) -#define PHP_PROTO_RETURN_STRINGL(s, len, copy) RETURN_STRINGL(s, len, copy) -#define PHP_PROTO_RETVAL_STRINGL(s, len, copy) RETVAL_STRINGL(s, len, copy) -#define php_proto_zend_make_printable_zval(from, to) \ - { \ - int use_copy; \ - zend_make_printable_zval(from, to, &use_copy); \ - } - -// PHP Array - -#define PHP_PROTO_HASH_OF(array) Z_ARRVAL_P(array) - -#define php_proto_zend_hash_index_update_zval(ht, h, pData) \ - zend_hash_index_update(ht, h, &(pData), sizeof(void*), NULL) - -#define php_proto_zend_hash_update_zval(ht, key, key_len, value) \ - zend_hash_update(ht, key, key_len, value, sizeof(void*), NULL) - -#define php_proto_zend_hash_update(ht, key, key_len) \ - zend_hash_update(ht, key, key_len, 0, 0, NULL) - -#define php_proto_zend_hash_index_update_mem(ht, h, pData, nDataSize, pDest) \ - zend_hash_index_update(ht, h, pData, nDataSize, pDest) - -#define php_proto_zend_hash_update_mem(ht, key, key_len, pData, nDataSize, \ - pDest) \ - zend_hash_update(ht, key, key_len, pData, nDataSize, pDest) - -#define php_proto_zend_hash_index_find_zval(ht, h, pDest) \ - zend_hash_index_find(ht, h, pDest) - -#define php_proto_zend_hash_find(ht, key, key_len, pDest) \ - zend_hash_find(ht, key, key_len, pDest) - -#define php_proto_zend_hash_index_find_mem(ht, h, pDest) \ - zend_hash_index_find(ht, h, pDest) - -#define php_proto_zend_hash_find_zval(ht, key, key_len, pDest) \ - zend_hash_find(ht, key, key_len, pDest) - -#define php_proto_zend_hash_find_mem(ht, key, key_len, pDest) \ - zend_hash_find(ht, key, key_len, pDest) - -#define php_proto_zend_hash_next_index_insert_zval(ht, pData) \ - zend_hash_next_index_insert(ht, pData, sizeof(void*), NULL) - -#define php_proto_zend_hash_next_index_insert_mem(ht, pData, nDataSize, pDest) \ - zend_hash_next_index_insert(ht, pData, nDataSize, pDest) - -#define php_proto_zend_hash_get_current_data_ex(ht, pDest, pos) \ - zend_hash_get_current_data_ex(ht, pDest, pos) - -// PHP Object - -#define PHP_PROTO_WRAP_OBJECT_START(name) \ - struct name { \ - zend_object std; -#define PHP_PROTO_WRAP_OBJECT_END \ - }; - -#define PHP_PROTO_INIT_SUBMSGCLASS_START(CLASSNAME, CAMELNAME, LOWWERNAME) \ - void LOWWERNAME##_init(TSRMLS_D) { \ - zend_class_entry class_type; \ - const char* class_name = CLASSNAME; \ - INIT_CLASS_ENTRY_EX(class_type, CLASSNAME, strlen(CLASSNAME), \ - LOWWERNAME##_methods); \ - LOWWERNAME##_type = zend_register_internal_class_ex( \ - &class_type, message_type, NULL TSRMLS_CC); \ - LOWWERNAME##_type->create_object = message_create; \ - zend_do_inheritance(LOWWERNAME##_type, message_type TSRMLS_CC); -#define PHP_PROTO_INIT_SUBMSGCLASS_END \ - } - -#define PHP_PROTO_INIT_ENUMCLASS_START(CLASSNAME, CAMELNAME, LOWWERNAME) \ - void LOWWERNAME##_init(TSRMLS_D) { \ - zend_class_entry class_type; \ - const char* class_name = CLASSNAME; \ - INIT_CLASS_ENTRY_EX(class_type, CLASSNAME, strlen(CLASSNAME), \ - LOWWERNAME##_methods); \ - LOWWERNAME##_type = zend_register_internal_class(&class_type TSRMLS_CC); -#define PHP_PROTO_INIT_ENUMCLASS_END \ - } - -#define PHP_PROTO_INIT_CLASS_START(CLASSNAME, CAMELNAME, LOWWERNAME) \ - void LOWWERNAME##_init(TSRMLS_D) { \ - zend_class_entry class_type; \ - const char* class_name = CLASSNAME; \ - INIT_CLASS_ENTRY_EX(class_type, CLASSNAME, strlen(CLASSNAME), \ - LOWWERNAME##_methods); \ - LOWWERNAME##_type = zend_register_internal_class(&class_type TSRMLS_CC); \ - LOWWERNAME##_type->create_object = LOWWERNAME##_create; \ - LOWWERNAME##_handlers = PEMALLOC(zend_object_handlers); \ - memcpy(LOWWERNAME##_handlers, zend_get_std_object_handlers(), \ - sizeof(zend_object_handlers)); -#define PHP_PROTO_INIT_CLASS_END \ - } - -#define PHP_PROTO_OBJECT_CREATE_START(NAME, LOWWERNAME) \ - static zend_object_value LOWWERNAME##_create( \ - zend_class_entry* ce TSRMLS_DC) { \ - PHP_PROTO_ALLOC_CLASS_OBJECT(NAME, ce); \ - zend_object_std_init(&intern->std, ce TSRMLS_CC); \ - object_properties_init(&intern->std, ce); -#define PHP_PROTO_OBJECT_CREATE_END(NAME, LOWWERNAME) \ - PHP_PROTO_FREE_CLASS_OBJECT(NAME, LOWWERNAME##_free, LOWWERNAME##_handlers); \ - } - -#define PHP_PROTO_OBJECT_FREE_START(classname, lowername) \ - void lowername##_free(void* object TSRMLS_DC) { \ - classname* intern = object; -#define PHP_PROTO_OBJECT_FREE_END \ - zend_object_std_dtor(&intern->std TSRMLS_CC); \ - efree(intern); \ - } - -#define PHP_PROTO_OBJECT_DTOR_START(classname, lowername) -#define PHP_PROTO_OBJECT_DTOR_END - -#define CACHED_VALUE zval* -#define CACHED_TO_ZVAL_PTR(VALUE) (VALUE) -#define CACHED_PTR_TO_ZVAL_PTR(VALUE) (*VALUE) -#define ZVAL_PTR_TO_CACHED_PTR(VALUE) (&VALUE) -#define ZVAL_PTR_TO_CACHED_VALUE(VALUE) (VALUE) -#define ZVAL_TO_CACHED_VALUE(VALUE) (&VALUE) - -#define CREATE_OBJ_ON_ALLOCATED_ZVAL_PTR(zval_ptr, class_type) \ - ZVAL_OBJ(zval_ptr, class_type->create_object(class_type TSRMLS_CC)); - -#define PHP_PROTO_SEPARATE_ZVAL_IF_NOT_REF(value) \ - SEPARATE_ZVAL_IF_NOT_REF(value) - -#define PHP_PROTO_GLOBAL_UNINITIALIZED_ZVAL EG(uninitialized_zval_ptr) - -#define OBJ_PROP(OBJECT, OFFSET) &((OBJECT)->properties_table[OFFSET]) - -#define php_proto_zval_ptr_dtor(zval_ptr) \ - zval_ptr_dtor(&(zval_ptr)) - -#define PHP_PROTO_ALLOC_CLASS_OBJECT(class_object, class_type) \ - class_object* intern; \ - intern = (class_object*)emalloc(sizeof(class_object)); \ - memset(intern, 0, sizeof(class_object)); - -#define PHP_PROTO_FREE_CLASS_OBJECT(class_object, class_object_free, handler) \ - zend_object_value retval = {0}; \ - retval.handle = zend_objects_store_put( \ - intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, \ - class_object_free, NULL TSRMLS_CC); \ - retval.handlers = handler; \ - return retval; - -#define PHP_PROTO_ALLOC_ARRAY(zval_ptr) \ - ALLOC_HASHTABLE(Z_ARRVAL_P(zval_ptr)); \ - Z_TYPE_P(zval_ptr) = IS_ARRAY; - -#define ZVAL_OBJ(zval_ptr, call_create) \ - Z_TYPE_P(zval_ptr) = IS_OBJECT; \ - Z_OBJVAL_P(zval_ptr) = call_create; - -#define UNBOX(class_name, val) \ - (class_name*)zend_object_store_get_object(val TSRMLS_CC); - -#define UNBOX_HASHTABLE_VALUE(class_name, val) UNBOX(class_name, val) - -#define HASHTABLE_VALUE_DTOR ZVAL_PTR_DTOR - -#define PHP_PROTO_HASHTABLE_VALUE zval* -#define HASHTABLE_VALUE_CE(val) Z_OBJCE_P(val) - -#define CREATE_HASHTABLE_VALUE(OBJ, WRAPPED_OBJ, OBJ_TYPE, OBJ_CLASS_ENTRY) \ - OBJ_TYPE* OBJ; \ - PHP_PROTO_HASHTABLE_VALUE WRAPPED_OBJ; \ - MAKE_STD_ZVAL(WRAPPED_OBJ); \ - ZVAL_OBJ(WRAPPED_OBJ, \ - OBJ_CLASS_ENTRY->create_object(OBJ_CLASS_ENTRY TSRMLS_CC)); \ - OBJ = UNBOX_HASHTABLE_VALUE(OBJ_TYPE, WRAPPED_OBJ); \ - Z_DELREF_P(desc_php); - -#define PHP_PROTO_CE_DECLARE zend_class_entry** -#define PHP_PROTO_CE_UNREF(ce) (*ce) - -#define php_proto_zend_lookup_class(name, name_length, ce) \ - zend_lookup_class(name, name_length, ce TSRMLS_CC) - -#define PHP_PROTO_RETVAL_ZVAL(value) ZVAL_ZVAL(return_value, value, 1, 0) - -#else // PHP_MAJOR_VERSION >= 7 - -#define php_proto_zend_literal void** -#define PHP_PROTO_CASE_IS_BOOL IS_TRUE: case IS_FALSE -#define PHP_PROTO_SIZE size_t -#define PHP_PROTO_LONG zend_long -#define PHP_PROTO_TSRMLS_DC -#define PHP_PROTO_TSRMLS_CC - -// PHP String - -#define PHP_PROTO_ZVAL_STRING(zval_ptr, s, copy) \ - ZVAL_STRING(zval_ptr, s) -#define PHP_PROTO_ZVAL_STRINGL(zval_ptr, s, len, copy) \ - ZVAL_STRINGL(zval_ptr, s, len) -#define PHP_PROTO_RETURN_STRING(s, copy) RETURN_STRING(s) -#define PHP_PROTO_RETURN_STRINGL(s, len, copy) RETURN_STRINGL(s, len) -#define PHP_PROTO_RETVAL_STRINGL(s, len, copy) RETVAL_STRINGL(s, len) -#define php_proto_zend_make_printable_zval(from, to) \ - zend_make_printable_zval(from, to) - -// PHP Array - -#define PHP_PROTO_HASH_OF(array) Z_ARRVAL_P(&array) - -static inline int php_proto_zend_hash_index_update_zval(HashTable* ht, ulong h, - zval* pData) { - void* result = NULL; - result = zend_hash_index_update(ht, h, pData); - return result != NULL ? SUCCESS : FAILURE; -} - -static inline int php_proto_zend_hash_update(HashTable* ht, const char* key, - size_t key_len) { - void* result = NULL; - zval temp; - ZVAL_LONG(&temp, 0); - result = zend_hash_str_update(ht, key, key_len, &temp); - return result != NULL ? SUCCESS : FAILURE; -} - -static inline int php_proto_zend_hash_index_update_mem(HashTable* ht, ulong h, - void* pData, uint nDataSize, - void** pDest) { - void* result = NULL; - result = zend_hash_index_update_mem(ht, h, pData, nDataSize); - if (pDest != NULL) *pDest = result; - return result != NULL ? SUCCESS : FAILURE; -} - -static inline int php_proto_zend_hash_update_zval(HashTable* ht, - const char* key, uint key_len, - zval* pData) { - void* result = NULL; - zend_string* internal_key = zend_string_init(key, key_len, 0); - result = zend_hash_update(ht, internal_key, pData); - return result != NULL ? SUCCESS : FAILURE; -} - -static inline int php_proto_zend_hash_update_mem(HashTable* ht, const char* key, - uint key_len, void* pData, - uint nDataSize, void** pDest) { - zend_string* internal_key = zend_string_init(key, key_len, 0); - void* result = zend_hash_update_mem(ht, internal_key, pData, nDataSize); - zend_string_release(internal_key); - if (pDest != NULL) *pDest = result; - return result != NULL ? SUCCESS : FAILURE; -} - -static inline int php_proto_zend_hash_index_find_zval(const HashTable* ht, - ulong h, void** pDest) { - zval* result = zend_hash_index_find(ht, h); - if (pDest != NULL) *pDest = result; - return result != NULL ? SUCCESS : FAILURE; -} - -static inline int php_proto_zend_hash_find(const HashTable* ht, const char* key, - size_t key_len, void** pDest) { - void* result = NULL; - result = zend_hash_str_find(ht, key, key_len); - return result != NULL ? SUCCESS : FAILURE; -} - -static inline int php_proto_zend_hash_index_find_mem(const HashTable* ht, - ulong h, void** pDest) { - void* result = NULL; - result = zend_hash_index_find_ptr(ht, h); - if (pDest != NULL) *pDest = result; - return result != NULL ? SUCCESS : FAILURE; -} - -static inline int php_proto_zend_hash_find_zval(const HashTable* ht, - const char* key, uint key_len, - void** pDest) { - zend_string* internal_key = zend_string_init(key, key_len, 1); - zval* result = zend_hash_find(ht, internal_key); - if (pDest != NULL) *pDest = result; - return result != NULL ? SUCCESS : FAILURE; -} - -static inline int php_proto_zend_hash_find_mem(const HashTable* ht, - const char* key, uint key_len, - void** pDest) { - zend_string* internal_key = zend_string_init(key, key_len, 1); - void* result = zend_hash_find_ptr(ht, internal_key); - zend_string_release(internal_key); - if (pDest != NULL) *pDest = result; - return result != NULL ? SUCCESS : FAILURE; -} - -static inline int php_proto_zend_hash_next_index_insert_zval(HashTable* ht, - void* pData) { - zval tmp; - ZVAL_OBJ(&tmp, *(zend_object**)pData); - zval* result = zend_hash_next_index_insert(ht, &tmp); - return result != NULL ? SUCCESS : FAILURE; -} - -static inline int php_proto_zend_hash_next_index_insert_mem(HashTable* ht, - void* pData, - uint nDataSize, - void** pDest) { - void* result = NULL; - result = zend_hash_next_index_insert_mem(ht, pData, nDataSize); - if (pDest != NULL) *pDest = result; - return result != NULL ? SUCCESS : FAILURE; -} - -static inline int php_proto_zend_hash_get_current_data_ex(HashTable* ht, - void** pDest, - HashPosition* pos) { - void* result = NULL; - result = zend_hash_get_current_data_ex(ht, pos); - if (pDest != NULL) *pDest = result; - return result != NULL ? SUCCESS : FAILURE; -} - -// PHP Object - -#define PHP_PROTO_WRAP_OBJECT_START(name) struct name { -#define PHP_PROTO_WRAP_OBJECT_END \ - zend_object std; \ - }; - -#define PHP_PROTO_INIT_SUBMSGCLASS_START(CLASSNAME, CAMELNAME, LOWWERNAME) \ - void LOWWERNAME##_init(TSRMLS_D) { \ - zend_class_entry class_type; \ - const char* class_name = CLASSNAME; \ - INIT_CLASS_ENTRY_EX(class_type, CLASSNAME, strlen(CLASSNAME), \ - LOWWERNAME##_methods); \ - LOWWERNAME##_type = zend_register_internal_class_ex( \ - &class_type, message_type TSRMLS_CC); \ - zend_do_inheritance(LOWWERNAME##_type, message_type TSRMLS_CC); -#define PHP_PROTO_INIT_SUBMSGCLASS_END \ - } - -#define PHP_PROTO_INIT_ENUMCLASS_START(CLASSNAME, CAMELNAME, LOWWERNAME) \ - void LOWWERNAME##_init(TSRMLS_D) { \ - zend_class_entry class_type; \ - const char* class_name = CLASSNAME; \ - INIT_CLASS_ENTRY_EX(class_type, CLASSNAME, strlen(CLASSNAME), \ - LOWWERNAME##_methods); \ - LOWWERNAME##_type = zend_register_internal_class(&class_type TSRMLS_CC); -#define PHP_PROTO_INIT_ENUMCLASS_END \ - } - -#define PHP_PROTO_INIT_CLASS_START(CLASSNAME, CAMELNAME, LOWWERNAME) \ - void LOWWERNAME##_init(TSRMLS_D) { \ - zend_class_entry class_type; \ - const char* class_name = CLASSNAME; \ - INIT_CLASS_ENTRY_EX(class_type, CLASSNAME, strlen(CLASSNAME), \ - LOWWERNAME##_methods); \ - LOWWERNAME##_type = zend_register_internal_class(&class_type TSRMLS_CC); \ - LOWWERNAME##_type->create_object = LOWWERNAME##_create; \ - LOWWERNAME##_handlers = PEMALLOC(zend_object_handlers); \ - memcpy(LOWWERNAME##_handlers, zend_get_std_object_handlers(), \ - sizeof(zend_object_handlers)); \ - LOWWERNAME##_handlers->free_obj = LOWWERNAME##_free; \ - LOWWERNAME##_handlers->dtor_obj = LOWWERNAME##_dtor; \ - LOWWERNAME##_handlers->offset = XtOffsetOf(CAMELNAME, std); -#define PHP_PROTO_INIT_CLASS_END \ - } - -#define PHP_PROTO_OBJECT_FREE_START(classname, lowername) \ - void lowername##_free(zend_object* object) { \ - classname* intern = \ - (classname*)((char*)object - XtOffsetOf(classname, std)); -#define PHP_PROTO_OBJECT_FREE_END \ - } - -#define PHP_PROTO_OBJECT_DTOR_START(classname, lowername) \ - void lowername##_dtor(zend_object* object) { \ - classname* intern = \ - (classname*)((char*)object - XtOffsetOf(classname, std)); -#define PHP_PROTO_OBJECT_DTOR_END \ - zend_object_std_dtor(object TSRMLS_CC); \ - } - -#define PHP_PROTO_OBJECT_CREATE_START(NAME, LOWWERNAME) \ - static zend_object* LOWWERNAME##_create(zend_class_entry* ce TSRMLS_DC) { \ - PHP_PROTO_ALLOC_CLASS_OBJECT(NAME, ce); \ - zend_object_std_init(&intern->std, ce TSRMLS_CC); \ - object_properties_init(&intern->std, ce); -#define PHP_PROTO_OBJECT_CREATE_END(NAME, LOWWERNAME) \ - PHP_PROTO_FREE_CLASS_OBJECT(NAME, LOWWERNAME##_free, LOWWERNAME##_handlers); \ - } - -#define CACHED_VALUE zval -#define CACHED_TO_ZVAL_PTR(VALUE) (&VALUE) -#define CACHED_PTR_TO_ZVAL_PTR(VALUE) (VALUE) -#define ZVAL_PTR_TO_CACHED_PTR(VALUE) (VALUE) -#define ZVAL_PTR_TO_CACHED_VALUE(VALUE) (*VALUE) -#define ZVAL_TO_CACHED_VALUE(VALUE) (VALUE) - -#define CREATE_OBJ_ON_ALLOCATED_ZVAL_PTR(zval_ptr, class_type) \ - ZVAL_OBJ(zval_ptr, class_type->create_object(class_type)); - -#define PHP_PROTO_SEPARATE_ZVAL_IF_NOT_REF(value) ; - -#define PHP_PROTO_GLOBAL_UNINITIALIZED_ZVAL &EG(uninitialized_zval) - -#define php_proto_zval_ptr_dtor(zval_ptr) \ - zval_ptr_dtor(zval_ptr) - -#define PHP_PROTO_ALLOC_CLASS_OBJECT(class_object, class_type) \ - class_object* intern; \ - int size = sizeof(class_object) + zend_object_properties_size(class_type); \ - intern = ecalloc(1, size); \ - memset(intern, 0, size); - -#define PHP_PROTO_FREE_CLASS_OBJECT(class_object, class_object_free, handler) \ - intern->std.handlers = handler; \ - return &intern->std; - -#define PHP_PROTO_ALLOC_ARRAY(zval_ptr) \ - ZVAL_NEW_ARR(zval_ptr) - -#define UNBOX(class_name, val) \ - (class_name*)((char*)Z_OBJ_P(val) - XtOffsetOf(class_name, std)); - -#define UNBOX_HASHTABLE_VALUE(class_name, val) \ - (class_name*)((char*)val - XtOffsetOf(class_name, std)) - -#define HASHTABLE_VALUE_DTOR php_proto_hashtable_descriptor_release - -#define PHP_PROTO_HASHTABLE_VALUE zend_object* -#define HASHTABLE_VALUE_CE(val) val->ce - -#define CREATE_HASHTABLE_VALUE(OBJ, WRAPPED_OBJ, OBJ_TYPE, OBJ_CLASS_ENTRY) \ - OBJ_TYPE* OBJ; \ - PHP_PROTO_HASHTABLE_VALUE WRAPPED_OBJ; \ - WRAPPED_OBJ = OBJ_CLASS_ENTRY->create_object(OBJ_CLASS_ENTRY); \ - OBJ = UNBOX_HASHTABLE_VALUE(OBJ_TYPE, WRAPPED_OBJ); \ - GC_DELREF(WRAPPED_OBJ); - -#define PHP_PROTO_CE_DECLARE zend_class_entry* -#define PHP_PROTO_CE_UNREF(ce) (ce) - -static inline int php_proto_zend_lookup_class( - const char* name, int name_length, zend_class_entry** ce TSRMLS_DC) { - zend_string *zstr_name = zend_string_init(name, name_length, 0); - *ce = zend_lookup_class(zstr_name); - zend_string_release(zstr_name); - return *ce != NULL ? SUCCESS : FAILURE; -} - -#define PHP_PROTO_RETVAL_ZVAL(value) ZVAL_COPY(return_value, value) - -#endif // PHP_MAJOR_VERSION >= 7 - -#if PHP_MAJOR_VERSION < 7 || (PHP_MAJOR_VERSION == 7 && PHP_MINOR_VERSION == 0) -#define PHP_PROTO_FAKE_SCOPE_BEGIN(klass) \ - zend_class_entry* old_scope = EG(scope); \ - EG(scope) = klass; -#define PHP_PROTO_FAKE_SCOPE_RESTART(klass) \ - old_scope = EG(scope); \ - EG(scope) = klass; -#define PHP_PROTO_FAKE_SCOPE_END EG(scope) = old_scope; -#else -#define PHP_PROTO_FAKE_SCOPE_BEGIN(klass) \ - zend_class_entry* old_scope = EG(fake_scope); \ - EG(fake_scope) = klass; -#define PHP_PROTO_FAKE_SCOPE_RESTART(klass) \ - old_scope = EG(fake_scope); \ - EG(fake_scope) = klass; -#define PHP_PROTO_FAKE_SCOPE_END EG(fake_scope) = old_scope; -#endif - -// Define PHP class -#define DEFINE_PROTOBUF_INIT_CLASS(CLASSNAME, CAMELNAME, LOWERNAME) \ - PHP_PROTO_INIT_CLASS_START(CLASSNAME, CAMELNAME, LOWERNAME) \ - PHP_PROTO_INIT_CLASS_END - -#define DEFINE_PROTOBUF_CREATE(NAME, LOWERNAME) \ - PHP_PROTO_OBJECT_CREATE_START(NAME, LOWERNAME) \ - LOWERNAME##_init_c_instance(intern TSRMLS_CC); \ - PHP_PROTO_OBJECT_CREATE_END(NAME, LOWERNAME) - -#define DEFINE_PROTOBUF_FREE(CAMELNAME, LOWERNAME) \ - PHP_PROTO_OBJECT_FREE_START(CAMELNAME, LOWERNAME) \ - LOWERNAME##_free_c(intern TSRMLS_CC); \ - PHP_PROTO_OBJECT_FREE_END - -#define DEFINE_PROTOBUF_DTOR(CAMELNAME, LOWERNAME) \ - PHP_PROTO_OBJECT_DTOR_START(CAMELNAME, LOWERNAME) \ - PHP_PROTO_OBJECT_DTOR_END - -#define DEFINE_CLASS(NAME, LOWERNAME, string_name) \ - zend_class_entry *LOWERNAME##_type; \ - zend_object_handlers *LOWERNAME##_handlers; \ - DEFINE_PROTOBUF_FREE(NAME, LOWERNAME) \ - DEFINE_PROTOBUF_DTOR(NAME, LOWERNAME) \ - DEFINE_PROTOBUF_CREATE(NAME, LOWERNAME) \ - DEFINE_PROTOBUF_INIT_CLASS(string_name, NAME, LOWERNAME) - -// ----------------------------------------------------------------------------- -// Forward Declaration -// ---------------------------------------------------------------------------- - -struct Any; -struct Api; -struct BoolValue; -struct BytesValue; -struct Descriptor; -struct DescriptorPool; -struct DoubleValue; -struct Duration; -struct Enum; -struct EnumDescriptor; -struct EnumValue; -struct EnumValueDescriptor; -struct Field; -struct FieldDescriptor; -struct FieldMask; -struct Field_Cardinality; -struct Field_Kind; -struct FloatValue; -struct GPBEmpty; -struct Int32Value; -struct Int64Value; -struct InternalDescriptorPool; -struct ListValue; -struct Map; -struct MapIter; -struct MessageField; -struct MessageHeader; -struct MessageLayout; -struct Method; -struct Mixin; -struct NullValue; -struct Oneof; -struct Option; -struct RepeatedField; -struct RepeatedFieldIter; -struct SourceContext; -struct StringValue; -struct Struct; -struct Syntax; -struct Timestamp; -struct Type; -struct UInt32Value; -struct UInt64Value; -struct Value; - -typedef struct Any Any; -typedef struct Api Api; -typedef struct BoolValue BoolValue; -typedef struct BytesValue BytesValue; -typedef struct Descriptor Descriptor; -typedef struct DescriptorPool DescriptorPool; -typedef struct DoubleValue DoubleValue; -typedef struct Duration Duration; -typedef struct EnumDescriptor EnumDescriptor; -typedef struct Enum Enum; -typedef struct EnumValueDescriptor EnumValueDescriptor; -typedef struct EnumValue EnumValue; -typedef struct Field_Cardinality Field_Cardinality; -typedef struct FieldDescriptor FieldDescriptor; -typedef struct Field Field; -typedef struct Field_Kind Field_Kind; -typedef struct FieldMask FieldMask; -typedef struct FloatValue FloatValue; -typedef struct GPBEmpty GPBEmpty; -typedef struct Int32Value Int32Value; -typedef struct Int64Value Int64Value; -typedef struct InternalDescriptorPool InternalDescriptorPool; -typedef struct ListValue ListValue; -typedef struct MapIter MapIter; -typedef struct Map Map; -typedef struct MessageField MessageField; -typedef struct MessageHeader MessageHeader; -typedef struct MessageLayout MessageLayout; -typedef struct Method Method; -typedef struct Mixin Mixin; -typedef struct NullValue NullValue; -typedef struct Oneof Oneof; -typedef struct Option Option; -typedef struct RepeatedFieldIter RepeatedFieldIter; -typedef struct RepeatedField RepeatedField; -typedef struct SourceContext SourceContext; -typedef struct StringValue StringValue; -typedef struct Struct Struct; -typedef struct Syntax Syntax; -typedef struct Timestamp Timestamp; -typedef struct Type Type; -typedef struct UInt32Value UInt32Value; -typedef struct UInt64Value UInt64Value; -typedef struct Value Value; - -// ----------------------------------------------------------------------------- -// Globals. -// ----------------------------------------------------------------------------- - -ZEND_BEGIN_MODULE_GLOBALS(protobuf) -ZEND_END_MODULE_GLOBALS(protobuf) - -// Init module and PHP classes. -void any_init(TSRMLS_D); -void api_init(TSRMLS_D); -void bool_value_init(TSRMLS_D); -void bytes_value_init(TSRMLS_D); -void descriptor_init(TSRMLS_D); -void descriptor_pool_init(TSRMLS_D); -void double_value_init(TSRMLS_D); -void duration_init(TSRMLS_D); -void empty_init(TSRMLS_D); -void enum_descriptor_init(TSRMLS_D); -void enum_value_descriptor_init(TSRMLS_D); -void enum_init(TSRMLS_D); -void enum_value_init(TSRMLS_D); -void field_cardinality_init(TSRMLS_D); -void field_descriptor_init(TSRMLS_D); -void field_init(TSRMLS_D); -void field_kind_init(TSRMLS_D); -void field_mask_init(TSRMLS_D); -void float_value_init(TSRMLS_D); -void gpb_type_init(TSRMLS_D); -void int32_value_init(TSRMLS_D); -void int64_value_init(TSRMLS_D); -void internal_descriptor_pool_init(TSRMLS_D); -void list_value_init(TSRMLS_D); -void map_field_init(TSRMLS_D); -void map_field_iter_init(TSRMLS_D); -void message_init(TSRMLS_D); -void method_init(TSRMLS_D); -void mixin_init(TSRMLS_D); -void null_value_init(TSRMLS_D); -void oneof_descriptor_init(TSRMLS_D); -void option_init(TSRMLS_D); -void repeated_field_init(TSRMLS_D); -void repeated_field_iter_init(TSRMLS_D); -void source_context_init(TSRMLS_D); -void string_value_init(TSRMLS_D); -void struct_init(TSRMLS_D); -void syntax_init(TSRMLS_D); -void timestamp_init(TSRMLS_D); -void type_init(TSRMLS_D); -void u_int32_value_init(TSRMLS_D); -void u_int64_value_init(TSRMLS_D); -void util_init(TSRMLS_D); -void value_init(TSRMLS_D); - -void gpb_metadata_any_init(TSRMLS_D); -void gpb_metadata_api_init(TSRMLS_D); -void gpb_metadata_duration_init(TSRMLS_D); -void gpb_metadata_field_mask_init(TSRMLS_D); -void gpb_metadata_empty_init(TSRMLS_D); -void gpb_metadata_source_context_init(TSRMLS_D); -void gpb_metadata_struct_init(TSRMLS_D); -void gpb_metadata_timestamp_init(TSRMLS_D); -void gpb_metadata_type_init(TSRMLS_D); -void gpb_metadata_wrappers_init(TSRMLS_D); - -// Global map from upb {msg,enum}defs to wrapper Descriptor/EnumDescriptor -// instances. -void add_def_obj(const void* def, PHP_PROTO_HASHTABLE_VALUE value); -PHP_PROTO_HASHTABLE_VALUE get_def_obj(const void* def); - -// Global map from PHP class entries to wrapper Descriptor/EnumDescriptor -// instances. -void add_ce_obj(const void* ce, PHP_PROTO_HASHTABLE_VALUE value); -PHP_PROTO_HASHTABLE_VALUE get_ce_obj(const void* ce); -bool class_added(const void* ce); - -// Global map from message/enum's proto fully-qualified name to corresponding -// wrapper Descriptor/EnumDescriptor instances. -void add_proto_obj(const char* proto, PHP_PROTO_HASHTABLE_VALUE value); -PHP_PROTO_HASHTABLE_VALUE get_proto_obj(const char* proto); - -extern zend_class_entry* map_field_type; -extern zend_class_entry* repeated_field_type; - -// ----------------------------------------------------------------------------- -// Descriptor. -// ----------------------------------------------------------------------------- - -PHP_PROTO_WRAP_OBJECT_START(DescriptorPool) - InternalDescriptorPool* intern; -PHP_PROTO_WRAP_OBJECT_END - -PHP_METHOD(DescriptorPool, getGeneratedPool); -PHP_METHOD(DescriptorPool, getDescriptorByClassName); -PHP_METHOD(DescriptorPool, getEnumDescriptorByClassName); - -PHP_PROTO_WRAP_OBJECT_START(InternalDescriptorPool) - upb_symtab* symtab; - upb_handlercache* fill_handler_cache; - upb_handlercache* pb_serialize_handler_cache; - upb_handlercache* json_serialize_handler_cache; - upb_handlercache* json_serialize_handler_preserve_cache; - upb_pbcodecache* fill_method_cache; - upb_json_codecache* json_fill_method_cache; -PHP_PROTO_WRAP_OBJECT_END - -PHP_METHOD(InternalDescriptorPool, getGeneratedPool); -PHP_METHOD(InternalDescriptorPool, internalAddGeneratedFile); - -void internal_add_generated_file(const char* data, PHP_PROTO_SIZE data_len, - InternalDescriptorPool* pool, - bool use_nested_submsg TSRMLS_DC); -void init_generated_pool_once(TSRMLS_D); -void add_handlers_for_message(const void* closure, upb_handlers* h); - -// wrapper of generated pool -#if PHP_MAJOR_VERSION < 7 -extern zval* generated_pool_php; -extern zval* internal_generated_pool_php; -void descriptor_pool_free(void* object TSRMLS_DC); -void internal_descriptor_pool_free(void* object TSRMLS_DC); -#else -extern zend_object *generated_pool_php; -extern zend_object *internal_generated_pool_php; -void descriptor_pool_free(zend_object* object); -void internal_descriptor_pool_free(zend_object* object); -#endif -extern InternalDescriptorPool* generated_pool; // The actual generated pool - -PHP_PROTO_WRAP_OBJECT_START(Descriptor) - InternalDescriptorPool* pool; - const upb_msgdef* msgdef; - MessageLayout* layout; - zend_class_entry* klass; // begins as NULL -PHP_PROTO_WRAP_OBJECT_END - -PHP_METHOD(Descriptor, getClass); -PHP_METHOD(Descriptor, getFullName); -PHP_METHOD(Descriptor, getField); -PHP_METHOD(Descriptor, getFieldCount); -PHP_METHOD(Descriptor, getOneofDecl); -PHP_METHOD(Descriptor, getOneofDeclCount); - -extern zend_class_entry* descriptor_type; - -void descriptor_name_set(Descriptor *desc, const char *name); - -PHP_PROTO_WRAP_OBJECT_START(FieldDescriptor) - const upb_fielddef* fielddef; -PHP_PROTO_WRAP_OBJECT_END - -PHP_METHOD(FieldDescriptor, getName); -PHP_METHOD(FieldDescriptor, getNumber); -PHP_METHOD(FieldDescriptor, getLabel); -PHP_METHOD(FieldDescriptor, getType); -PHP_METHOD(FieldDescriptor, isMap); -PHP_METHOD(FieldDescriptor, getEnumType); -PHP_METHOD(FieldDescriptor, getMessageType); - -extern zend_class_entry* field_descriptor_type; - -PHP_PROTO_WRAP_OBJECT_START(EnumDescriptor) - const upb_enumdef* enumdef; - zend_class_entry* klass; // begins as NULL -PHP_PROTO_WRAP_OBJECT_END - -PHP_METHOD(EnumDescriptor, getValue); -PHP_METHOD(EnumDescriptor, getValueCount); - -extern zend_class_entry* enum_descriptor_type; - -PHP_PROTO_WRAP_OBJECT_START(EnumValueDescriptor) - const char* name; - int32_t number; -PHP_PROTO_WRAP_OBJECT_END - -PHP_METHOD(EnumValueDescriptor, getName); -PHP_METHOD(EnumValueDescriptor, getNumber); - -extern zend_class_entry* enum_value_descriptor_type; - -// ----------------------------------------------------------------------------- -// Message class creation. -// ----------------------------------------------------------------------------- - -void* message_data(MessageHeader* msg); -void custom_data_init(const zend_class_entry* ce, - MessageHeader* msg PHP_PROTO_TSRMLS_DC); - -// Build PHP class for given descriptor. Instead of building from scratch, this -// function modifies existing class which has been partially defined in PHP -// code. -void build_class_from_descriptor( - PHP_PROTO_HASHTABLE_VALUE php_descriptor TSRMLS_DC); - -extern zend_class_entry* message_type; -extern zend_object_handlers* message_handlers; - -// ----------------------------------------------------------------------------- -// Message layout / storage. -// ----------------------------------------------------------------------------- - -/* - * In c extension, each protobuf message is a zval instance. The zval instance - * is like union, which can be used to store int, string, zend_object_value and - * etc. For protobuf message, the zval instance is used to store the - * zend_object_value. - * - * The zend_object_value is composed of handlers and a handle to look up the - * actual stored data. The handlers are pointers to functions, e.g., read, - * write, and etc, to access properties. - * - * The actual data of protobuf messages is stored as MessageHeader in zend - * engine's central repository. Each MessageHeader instance is composed of a - * zend_object, a Descriptor instance and the real message data. - * - * For the reason that PHP's native types may not be large enough to store - * protobuf message's field (e.g., int64), all message's data is stored in - * custom memory layout and is indexed by the Descriptor instance. - * - * The zend_object contains the zend class entry and the properties table. The - * zend class entry contains all information about protobuf message's - * corresponding PHP class. The most useful information is the offset table of - * properties. Because read access to properties requires returning zval - * instance, we need to convert data from the custom layout to zval instance. - * Instead of creating zval instance for every read access, we use the zval - * instances in the properties table in the zend_object as cache. When - * accessing properties, the offset is needed to find the zval property in - * zend_object's properties table. These properties will be updated using the - * data from custom memory layout only when reading these properties. - * - * zval - * |-zend_object_value obj - * |-zend_object_handlers* handlers -> |-read_property_handler - * | |-write_property_handler - * | ++++++++++++++++++++++ - * |-zend_object_handle handle -> + central repository + - * ++++++++++++++++++++++ - * MessageHeader <-----------------| - * |-zend_object std - * | |-class_entry* ce -> class_entry - * | | |-HashTable properties_table (name->offset) - * | |-zval** properties_table <------------------------------| - * | |------> zval* property(cache) - * |-Descriptor* desc (name->offset) - * |-void** data <-----------| - * |-----------------------> void* property(data) - * - */ - -#define MESSAGE_FIELD_NO_CASE ((size_t)-1) - -struct MessageField { - size_t offset; - int cache_index; // Each field except oneof field has a zval cache to avoid - // multiple creation when being accessed. - size_t case_offset; // for oneofs, a uint32. Else, MESSAGE_FIELD_NO_CASE. -}; - -struct MessageLayout { - const upb_msgdef* msgdef; - MessageField* fields; - size_t size; -}; - -PHP_PROTO_WRAP_OBJECT_START(MessageHeader) - void* data; // Point to the real message data. - // Place needs to be consistent with map_parse_frame_data_t. - Descriptor* descriptor; // Kept alive by self.class.descriptor reference. -PHP_PROTO_WRAP_OBJECT_END - -MessageLayout* create_layout(const upb_msgdef* msgdef); -void layout_init(MessageLayout* layout, void* storage, - zend_object* object PHP_PROTO_TSRMLS_DC); -zval* layout_get(MessageLayout* layout, const void* storage, - const upb_fielddef* field, CACHED_VALUE* cache TSRMLS_DC); -void layout_set(MessageLayout* layout, MessageHeader* header, - const upb_fielddef* field, zval* val TSRMLS_DC); -void layout_merge(MessageLayout* layout, MessageHeader* from, - MessageHeader* to TSRMLS_DC); -const char* layout_get_oneof_case(MessageLayout* layout, const void* storage, - const upb_oneofdef* oneof TSRMLS_DC); -void free_layout(MessageLayout* layout); -uint32_t* slot_oneof_case(MessageLayout* layout, const void* storage, - const upb_fielddef* field); -void* slot_memory(MessageLayout* layout, const void* storage, - const upb_fielddef* field); - -PHP_METHOD(Message, clear); -PHP_METHOD(Message, mergeFrom); -PHP_METHOD(Message, readOneof); -PHP_METHOD(Message, writeOneof); -PHP_METHOD(Message, whichOneof); -PHP_METHOD(Message, __construct); - -// ----------------------------------------------------------------------------- -// Encode / Decode. -// ----------------------------------------------------------------------------- - -// Maximum depth allowed during encoding, to avoid stack overflows due to -// cycles. -#define ENCODE_MAX_NESTING 63 - -// Constructs the upb decoder method for parsing messages of this type. -// This is called from the message class creation code. -const upb_pbdecodermethod *new_fillmsg_decodermethod(Descriptor *desc, - const void *owner); -void serialize_to_string(zval* val, zval* return_value TSRMLS_DC); -void merge_from_string(const char* data, int data_len, Descriptor* desc, - MessageHeader* msg); - -PHP_METHOD(Message, serializeToString); -PHP_METHOD(Message, mergeFromString); -PHP_METHOD(Message, serializeToJsonString); -PHP_METHOD(Message, mergeFromJsonString); -PHP_METHOD(Message, discardUnknownFields); - -// ----------------------------------------------------------------------------- -// Type check / conversion. -// ----------------------------------------------------------------------------- - -bool protobuf_convert_to_int32(zval* from, int32_t* to); -bool protobuf_convert_to_uint32(zval* from, uint32_t* to); -bool protobuf_convert_to_int64(zval* from, int64_t* to); -bool protobuf_convert_to_uint64(zval* from, uint64_t* to); -bool protobuf_convert_to_float(zval* from, float* to); -bool protobuf_convert_to_double(zval* from, double* to); -bool protobuf_convert_to_bool(zval* from, int8_t* to); -bool protobuf_convert_to_string(zval* from); - -void check_repeated_field(const zend_class_entry* klass, PHP_PROTO_LONG type, - zval* val, zval* return_value); -void check_map_field(const zend_class_entry* klass, PHP_PROTO_LONG key_type, - PHP_PROTO_LONG value_type, zval* val, zval* return_value); - -PHP_METHOD(Util, checkInt32); -PHP_METHOD(Util, checkUint32); -PHP_METHOD(Util, checkInt64); -PHP_METHOD(Util, checkUint64); -PHP_METHOD(Util, checkEnum); -PHP_METHOD(Util, checkFloat); -PHP_METHOD(Util, checkDouble); -PHP_METHOD(Util, checkBool); -PHP_METHOD(Util, checkString); -PHP_METHOD(Util, checkBytes); -PHP_METHOD(Util, checkMessage); -PHP_METHOD(Util, checkMapField); -PHP_METHOD(Util, checkRepeatedField); - -// ----------------------------------------------------------------------------- -// Native slot storage abstraction. -// ----------------------------------------------------------------------------- - -#define NATIVE_SLOT_MAX_SIZE sizeof(uint64_t) - -size_t native_slot_size(upb_fieldtype_t type); -bool native_slot_set(upb_fieldtype_t type, const zend_class_entry* klass, - void* memory, zval* value TSRMLS_DC); -// String/Message is stored differently in array/map from normal message fields. -// So we need to make a special method to handle that. -bool native_slot_set_by_array(upb_fieldtype_t type, - const zend_class_entry* klass, void* memory, - zval* value TSRMLS_DC); -bool native_slot_set_by_map(upb_fieldtype_t type, const zend_class_entry* klass, - void* memory, zval* value TSRMLS_DC); -void native_slot_init(upb_fieldtype_t type, void* memory, CACHED_VALUE* cache); -// For each property, in order to avoid conversion between the zval object and -// the actual data type during parsing/serialization, the containing message -// object use the custom memory layout to store the actual data type for each -// property inside of it. To access a property from php code, the property -// needs to be converted to a zval object. The message object is not responsible -// for providing such a zval object. Instead the caller needs to provide one -// (cache) and update it with the actual data (memory). -void native_slot_get(upb_fieldtype_t type, const void* memory, - CACHED_VALUE* cache TSRMLS_DC); -// String/Message is stored differently in array/map from normal message fields. -// So we need to make a special method to handle that. -void native_slot_get_by_array(upb_fieldtype_t type, const void* memory, - CACHED_VALUE* cache TSRMLS_DC); -void native_slot_get_by_map_key(upb_fieldtype_t type, const void* memory, - int length, CACHED_VALUE* cache TSRMLS_DC); -void native_slot_get_by_map_value(upb_fieldtype_t type, const void* memory, - CACHED_VALUE* cache TSRMLS_DC); -void native_slot_get_default(upb_fieldtype_t type, - CACHED_VALUE* cache TSRMLS_DC); - -// ----------------------------------------------------------------------------- -// Map Field. -// ----------------------------------------------------------------------------- - -extern zend_object_handlers* map_field_handlers; -extern zend_object_handlers* map_field_iter_handlers; - -PHP_PROTO_WRAP_OBJECT_START(Map) - upb_fieldtype_t key_type; - upb_fieldtype_t value_type; - const zend_class_entry* msg_ce; // class entry for value message - upb_strtable table; -PHP_PROTO_WRAP_OBJECT_END - -PHP_PROTO_WRAP_OBJECT_START(MapIter) - Map* self; - upb_strtable_iter it; -PHP_PROTO_WRAP_OBJECT_END - -void map_begin(zval* self, MapIter* iter TSRMLS_DC); -void map_next(MapIter* iter); -bool map_done(MapIter* iter); -const char* map_iter_key(MapIter* iter, int* len); -upb_value map_iter_value(MapIter* iter, int* len); - -// These operate on a map-entry msgdef. -const upb_fielddef* map_entry_key(const upb_msgdef* msgdef); -const upb_fielddef* map_entry_value(const upb_msgdef* msgdef); - -void map_field_create_with_field(const zend_class_entry* ce, - const upb_fielddef* field, - CACHED_VALUE* map_field PHP_PROTO_TSRMLS_DC); -void map_field_create_with_type(const zend_class_entry* ce, - upb_fieldtype_t key_type, - upb_fieldtype_t value_type, - const zend_class_entry* msg_ce, - CACHED_VALUE* map_field PHP_PROTO_TSRMLS_DC); -void* upb_value_memory(upb_value* v); - -#define MAP_KEY_FIELD 1 -#define MAP_VALUE_FIELD 2 - -// These operate on a map field (i.e., a repeated field of submessages whose -// submessage type is a map-entry msgdef). -bool is_map_field(const upb_fielddef* field); -const upb_fielddef* map_field_key(const upb_fielddef* field); -const upb_fielddef* map_field_value(const upb_fielddef* field); - -bool map_index_set(Map *intern, const char* keyval, int length, upb_value v); - -PHP_METHOD(MapField, __construct); -PHP_METHOD(MapField, offsetExists); -PHP_METHOD(MapField, offsetGet); -PHP_METHOD(MapField, offsetSet); -PHP_METHOD(MapField, offsetUnset); -PHP_METHOD(MapField, count); -PHP_METHOD(MapField, getIterator); - -PHP_METHOD(MapFieldIter, rewind); -PHP_METHOD(MapFieldIter, current); -PHP_METHOD(MapFieldIter, key); -PHP_METHOD(MapFieldIter, next); -PHP_METHOD(MapFieldIter, valid); - -// ----------------------------------------------------------------------------- -// Repeated Field. -// ----------------------------------------------------------------------------- - -extern zend_object_handlers* repeated_field_handlers; -extern zend_object_handlers* repeated_field_iter_handlers; - -PHP_PROTO_WRAP_OBJECT_START(RepeatedField) -#if PHP_MAJOR_VERSION < 7 - zval* array; -#else - zval array; -#endif - upb_fieldtype_t type; - const zend_class_entry* msg_ce; // class entry for containing message - // (for message field only). -PHP_PROTO_WRAP_OBJECT_END - -PHP_PROTO_WRAP_OBJECT_START(RepeatedFieldIter) - RepeatedField* repeated_field; - long position; -PHP_PROTO_WRAP_OBJECT_END - -void repeated_field_create_with_field( - zend_class_entry* ce, const upb_fielddef* field, - CACHED_VALUE* repeated_field PHP_PROTO_TSRMLS_DC); -void repeated_field_create_with_type( - zend_class_entry* ce, upb_fieldtype_t type, const zend_class_entry* msg_ce, - CACHED_VALUE* repeated_field PHP_PROTO_TSRMLS_DC); -// Return the element at the index position from the repeated field. There is -// not restriction on the type of stored elements. -void *repeated_field_index_native(RepeatedField *intern, int index TSRMLS_DC); -// Add the element to the end of the repeated field. There is not restriction on -// the type of stored elements. -void repeated_field_push_native(RepeatedField *intern, void *value); - -PHP_METHOD(RepeatedField, __construct); -PHP_METHOD(RepeatedField, append); -PHP_METHOD(RepeatedField, offsetExists); -PHP_METHOD(RepeatedField, offsetGet); -PHP_METHOD(RepeatedField, offsetSet); -PHP_METHOD(RepeatedField, offsetUnset); -PHP_METHOD(RepeatedField, count); -PHP_METHOD(RepeatedField, getIterator); - -PHP_METHOD(RepeatedFieldIter, rewind); -PHP_METHOD(RepeatedFieldIter, current); -PHP_METHOD(RepeatedFieldIter, key); -PHP_METHOD(RepeatedFieldIter, next); -PHP_METHOD(RepeatedFieldIter, valid); - -// ----------------------------------------------------------------------------- -// Oneof Field. -// ----------------------------------------------------------------------------- - -PHP_PROTO_WRAP_OBJECT_START(Oneof) - const upb_oneofdef* oneofdef; - int index; // Index of field in oneof. -1 if not set. - char value[NATIVE_SLOT_MAX_SIZE]; -PHP_PROTO_WRAP_OBJECT_END - -PHP_METHOD(Oneof, getName); -PHP_METHOD(Oneof, getField); -PHP_METHOD(Oneof, getFieldCount); - -extern zend_class_entry* oneof_descriptor_type; - -// Oneof case slot value to indicate that no oneof case is set. The value `0` is -// safe because field numbers are used as case identifiers, and no field can -// have a number of 0. -#define ONEOF_CASE_NONE 0 - -// ----------------------------------------------------------------------------- -// Well Known Type. -// ----------------------------------------------------------------------------- - -extern bool is_inited_file_any; -extern bool is_inited_file_api; -extern bool is_inited_file_duration; -extern bool is_inited_file_field_mask; -extern bool is_inited_file_empty; -extern bool is_inited_file_source_context; -extern bool is_inited_file_struct; -extern bool is_inited_file_timestamp; -extern bool is_inited_file_type; -extern bool is_inited_file_wrappers; - -PHP_METHOD(GPBMetadata_Any, initOnce); -PHP_METHOD(GPBMetadata_Api, initOnce); -PHP_METHOD(GPBMetadata_Duration, initOnce); -PHP_METHOD(GPBMetadata_FieldMask, initOnce); -PHP_METHOD(GPBMetadata_Empty, initOnce); -PHP_METHOD(GPBMetadata_SourceContext, initOnce); -PHP_METHOD(GPBMetadata_Struct, initOnce); -PHP_METHOD(GPBMetadata_Timestamp, initOnce); -PHP_METHOD(GPBMetadata_Type, initOnce); -PHP_METHOD(GPBMetadata_Wrappers, initOnce); - -PHP_METHOD(Any, __construct); -PHP_METHOD(Any, getTypeUrl); -PHP_METHOD(Any, setTypeUrl); -PHP_METHOD(Any, getValue); -PHP_METHOD(Any, setValue); -PHP_METHOD(Any, unpack); -PHP_METHOD(Any, pack); -PHP_METHOD(Any, is); - -PHP_METHOD(Duration, __construct); -PHP_METHOD(Duration, getSeconds); -PHP_METHOD(Duration, setSeconds); -PHP_METHOD(Duration, getNanos); -PHP_METHOD(Duration, setNanos); - -PHP_METHOD(Timestamp, __construct); -PHP_METHOD(Timestamp, fromDateTime); -PHP_METHOD(Timestamp, toDateTime); -PHP_METHOD(Timestamp, getSeconds); -PHP_METHOD(Timestamp, setSeconds); -PHP_METHOD(Timestamp, getNanos); -PHP_METHOD(Timestamp, setNanos); - -PHP_METHOD(Api, __construct); -PHP_METHOD(Api, getName); -PHP_METHOD(Api, setName); -PHP_METHOD(Api, getMethods); -PHP_METHOD(Api, setMethods); -PHP_METHOD(Api, getOptions); -PHP_METHOD(Api, setOptions); -PHP_METHOD(Api, getVersion); -PHP_METHOD(Api, setVersion); -PHP_METHOD(Api, getSourceContext); -PHP_METHOD(Api, setSourceContext); -PHP_METHOD(Api, getMixins); -PHP_METHOD(Api, setMixins); -PHP_METHOD(Api, getSyntax); -PHP_METHOD(Api, setSyntax); - -PHP_METHOD(BoolValue, __construct); -PHP_METHOD(BoolValue, getValue); -PHP_METHOD(BoolValue, setValue); - -PHP_METHOD(BytesValue, __construct); -PHP_METHOD(BytesValue, getValue); -PHP_METHOD(BytesValue, setValue); - -PHP_METHOD(DoubleValue, __construct); -PHP_METHOD(DoubleValue, getValue); -PHP_METHOD(DoubleValue, setValue); - -PHP_METHOD(Enum, __construct); -PHP_METHOD(Enum, getName); -PHP_METHOD(Enum, setName); -PHP_METHOD(Enum, getEnumvalue); -PHP_METHOD(Enum, setEnumvalue); -PHP_METHOD(Enum, getOptions); -PHP_METHOD(Enum, setOptions); -PHP_METHOD(Enum, getSourceContext); -PHP_METHOD(Enum, setSourceContext); -PHP_METHOD(Enum, getSyntax); -PHP_METHOD(Enum, setSyntax); - -PHP_METHOD(EnumValue, __construct); -PHP_METHOD(EnumValue, getName); -PHP_METHOD(EnumValue, setName); -PHP_METHOD(EnumValue, getNumber); -PHP_METHOD(EnumValue, setNumber); -PHP_METHOD(EnumValue, getOptions); -PHP_METHOD(EnumValue, setOptions); - -PHP_METHOD(FieldMask, __construct); -PHP_METHOD(FieldMask, getPaths); -PHP_METHOD(FieldMask, setPaths); - -PHP_METHOD(Field, __construct); -PHP_METHOD(Field, getKind); -PHP_METHOD(Field, setKind); -PHP_METHOD(Field, getCardinality); -PHP_METHOD(Field, setCardinality); -PHP_METHOD(Field, getNumber); -PHP_METHOD(Field, setNumber); -PHP_METHOD(Field, getName); -PHP_METHOD(Field, setName); -PHP_METHOD(Field, getTypeUrl); -PHP_METHOD(Field, setTypeUrl); -PHP_METHOD(Field, getOneofIndex); -PHP_METHOD(Field, setOneofIndex); -PHP_METHOD(Field, getPacked); -PHP_METHOD(Field, setPacked); -PHP_METHOD(Field, getOptions); -PHP_METHOD(Field, setOptions); -PHP_METHOD(Field, getJsonName); -PHP_METHOD(Field, setJsonName); -PHP_METHOD(Field, getDefaultValue); -PHP_METHOD(Field, setDefaultValue); - -PHP_METHOD(Field_Cardinality, name); -PHP_METHOD(Field_Cardinality, value); - -PHP_METHOD(Field_Kind, name); -PHP_METHOD(Field_Kind, value); - -PHP_METHOD(FloatValue, __construct); -PHP_METHOD(FloatValue, getValue); -PHP_METHOD(FloatValue, setValue); - -PHP_METHOD(GPBEmpty, __construct); - -PHP_METHOD(Int32Value, __construct); -PHP_METHOD(Int32Value, getValue); -PHP_METHOD(Int32Value, setValue); - -PHP_METHOD(Int64Value, __construct); -PHP_METHOD(Int64Value, getValue); -PHP_METHOD(Int64Value, setValue); - -PHP_METHOD(ListValue, __construct); -PHP_METHOD(ListValue, getValues); -PHP_METHOD(ListValue, setValues); - -PHP_METHOD(Method, __construct); -PHP_METHOD(Method, getName); -PHP_METHOD(Method, setName); -PHP_METHOD(Method, getRequestTypeUrl); -PHP_METHOD(Method, setRequestTypeUrl); -PHP_METHOD(Method, getRequestStreaming); -PHP_METHOD(Method, setRequestStreaming); -PHP_METHOD(Method, getResponseTypeUrl); -PHP_METHOD(Method, setResponseTypeUrl); -PHP_METHOD(Method, getResponseStreaming); -PHP_METHOD(Method, setResponseStreaming); -PHP_METHOD(Method, getOptions); -PHP_METHOD(Method, setOptions); -PHP_METHOD(Method, getSyntax); -PHP_METHOD(Method, setSyntax); - -PHP_METHOD(Mixin, __construct); -PHP_METHOD(Mixin, getName); -PHP_METHOD(Mixin, setName); -PHP_METHOD(Mixin, getRoot); -PHP_METHOD(Mixin, setRoot); - -PHP_METHOD(NullValue, name); -PHP_METHOD(NullValue, value); - -PHP_METHOD(Option, __construct); -PHP_METHOD(Option, getName); -PHP_METHOD(Option, setName); -PHP_METHOD(Option, getValue); -PHP_METHOD(Option, setValue); - -PHP_METHOD(SourceContext, __construct); -PHP_METHOD(SourceContext, getFileName); -PHP_METHOD(SourceContext, setFileName); - -PHP_METHOD(StringValue, __construct); -PHP_METHOD(StringValue, getValue); -PHP_METHOD(StringValue, setValue); - -PHP_METHOD(Struct, __construct); -PHP_METHOD(Struct, getFields); -PHP_METHOD(Struct, setFields); - -PHP_METHOD(Syntax, name); -PHP_METHOD(Syntax, value); - -PHP_METHOD(Type, __construct); -PHP_METHOD(Type, getName); -PHP_METHOD(Type, setName); -PHP_METHOD(Type, getFields); -PHP_METHOD(Type, setFields); -PHP_METHOD(Type, getOneofs); -PHP_METHOD(Type, setOneofs); -PHP_METHOD(Type, getOptions); -PHP_METHOD(Type, setOptions); -PHP_METHOD(Type, getSourceContext); -PHP_METHOD(Type, setSourceContext); -PHP_METHOD(Type, getSyntax); -PHP_METHOD(Type, setSyntax); - -PHP_METHOD(UInt32Value, __construct); -PHP_METHOD(UInt32Value, getValue); -PHP_METHOD(UInt32Value, setValue); - -PHP_METHOD(UInt64Value, __construct); -PHP_METHOD(UInt64Value, getValue); -PHP_METHOD(UInt64Value, setValue); - -PHP_METHOD(Value, __construct); -PHP_METHOD(Value, getNullValue); -PHP_METHOD(Value, setNullValue); -PHP_METHOD(Value, getNumberValue); -PHP_METHOD(Value, setNumberValue); -PHP_METHOD(Value, getStringValue); -PHP_METHOD(Value, setStringValue); -PHP_METHOD(Value, getBoolValue); -PHP_METHOD(Value, setBoolValue); -PHP_METHOD(Value, getStructValue); -PHP_METHOD(Value, setStructValue); -PHP_METHOD(Value, getListValue); -PHP_METHOD(Value, setListValue); -PHP_METHOD(Value, getKind); - -extern zend_class_entry* any_type; -extern zend_class_entry* api_type; -extern zend_class_entry* bool_value_type; -extern zend_class_entry* bytes_value_type; -extern zend_class_entry* double_value_type; -extern zend_class_entry* duration_type; -extern zend_class_entry* empty_type; -extern zend_class_entry* enum_type; -extern zend_class_entry* enum_value_type; -extern zend_class_entry* field_cardinality_type; -extern zend_class_entry* field_kind_type; -extern zend_class_entry* field_mask_type; -extern zend_class_entry* field_type; -extern zend_class_entry* float_value_type; -extern zend_class_entry* int32_value_type; -extern zend_class_entry* int64_value_type; -extern zend_class_entry* list_value_type; -extern zend_class_entry* method_type; -extern zend_class_entry* mixin_type; -extern zend_class_entry* null_value_type; -extern zend_class_entry* option_type; -extern zend_class_entry* source_context_type; -extern zend_class_entry* string_value_type; -extern zend_class_entry* struct_type; -extern zend_class_entry* syntax_type; -extern zend_class_entry* timestamp_type; -extern zend_class_entry* type_type; -extern zend_class_entry* uint32_value_type; -extern zend_class_entry* uint64_value_type; -extern zend_class_entry* value_type; - -// ----------------------------------------------------------------------------- -// Upb. -// ----------------------------------------------------------------------------- - -upb_fieldtype_t to_fieldtype(upb_descriptortype_t type); -const zend_class_entry* field_type_class( - const upb_fielddef* field PHP_PROTO_TSRMLS_DC); -void stringsink_uninit_opaque(void *sink); - -typedef struct { - upb_byteshandler handler; - upb_bytessink sink; - char *ptr; - size_t len, size; -} stringsink; - -void stringsink_init(stringsink *sink); -void stringsink_uninit(stringsink *sink); -size_t stringsink_string(void *_sink, const void *hd, const char *ptr, - size_t len, const upb_bufhandle *handle); - -// ----------------------------------------------------------------------------- -// Utilities. -// ----------------------------------------------------------------------------- - -// Memory management -#define ALLOC(class_name) (class_name*) emalloc(sizeof(class_name)) -#define PEMALLOC(class_name) (class_name*) pemalloc(sizeof(class_name), 1) -#define ALLOC_N(class_name, n) (class_name*) emalloc(sizeof(class_name) * n) -#define FREE(object) efree(object) -#define PEFREE(object) pefree(object, 1) - -// String argument. -#define STR(str) (str), strlen(str) - -// Zend Value -#if PHP_MAJOR_VERSION < 7 -#define Z_OBJ_P(zval_p) \ - ((zend_object*)(EG(objects_store) \ - .object_buckets[Z_OBJ_HANDLE_P(zval_p)] \ - .bucket.obj.object)) -#endif - -// Message handler -static inline zval* php_proto_message_read_property( - zval* msg, zval* member PHP_PROTO_TSRMLS_DC) { -#if PHP_MAJOR_VERSION < 7 - return message_handlers->read_property(msg, member, BP_VAR_R, - NULL PHP_PROTO_TSRMLS_CC); -#else - return message_handlers->read_property(msg, member, BP_VAR_R, NULL, - NULL PHP_PROTO_TSRMLS_CC); -#endif -} - -// Reserved name -bool is_reserved_name(const char* name); -bool is_valid_constant_name(const char* name); - -#endif // __GOOGLE_PROTOBUF_PHP_PROTOBUF_H__
diff --git a/protoc-artifacts/pom.xml b/protoc-artifacts/pom.xml index 29569ac..2931bb6 100644 --- a/protoc-artifacts/pom.xml +++ b/protoc-artifacts/pom.xml
@@ -8,7 +8,7 @@ </parent> <groupId>com.google.protobuf</groupId> <artifactId>protoc</artifactId> - <version>3.10.0</version> + <version>3.11.0-rc-0</version> <packaging>pom</packaging> <name>Protobuf Compiler</name> <description>
diff --git a/protoc-artifacts/pom.xml.orig b/protoc-artifacts/pom.xml.orig deleted file mode 100644 index ba4f417..0000000 --- a/protoc-artifacts/pom.xml.orig +++ /dev/null
@@ -1,148 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>com.google</groupId> - <artifactId>google</artifactId> - <version>1</version> - </parent> - <groupId>com.google.protobuf</groupId> - <artifactId>protoc</artifactId> -<<<<<<< HEAD - <version>3.10.0-rc-0</version> -======= - <version>3.10.0</version> ->>>>>>> 3.10.x - <packaging>pom</packaging> - <name>Protobuf Compiler</name> - <description> - Protobuf Compiler (protoc) is a compiler for .proto files. It generates - language-specific code for Protobuf messages and RPC interfaces. - </description> - <inceptionYear>2008</inceptionYear> - <url>https://developers.google.com/protocol-buffers/</url> - <licenses> - <license> - <name>3-Clause BSD License</name> - <url>https://opensource.org/licenses/BSD-3-Clause</url> - <distribution>repo</distribution> - </license> - </licenses> - <scm> - <url>https://github.com/protocolbuffers/protobuf</url> - <connection> - scm:git:https://github.com/protocolbuffers/protobuf.git - </connection> - </scm> - <build> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>1.8</version> - <executions> - <execution> - <id>attach-artifacts</id> - <phase>package</phase> - <goals> - <goal>attach-artifact</goal> - </goals> - <configuration> - <artifacts> - <artifact> - <file>${basedir}/target/linux/x86_64/protoc.exe</file> - <classifier>linux-x86_64</classifier> - <type>exe</type> - </artifact> - <artifact> - <file>${basedir}/target/linux/x86_32/protoc.exe</file> - <classifier>linux-x86_32</classifier> - <type>exe</type> - </artifact> - <artifact> - <file>${basedir}/target/windows/x86_64/protoc.exe</file> - <classifier>windows-x86_64</classifier> - <type>exe</type> - </artifact> - <artifact> - <file>${basedir}/target/windows/x86_32/protoc.exe</file> - <classifier>windows-x86_32</classifier> - <type>exe</type> - </artifact> - <artifact> - <file>${basedir}/target/osx/x86_64/protoc.exe</file> - <classifier>osx-x86_64</classifier> - <type>exe</type> - </artifact> - <artifact> - <file>${basedir}/target/osx/x86_32/protoc.exe</file> - <classifier>osx-x86_32</classifier> - <type>exe</type> - </artifact> - <artifact> - <file>${basedir}/target/linux/aarch_64/protoc.exe</file> - <classifier>linux-aarch_64</classifier> - <type>exe</type> - </artifact> - <artifact> - <file>${basedir}/target/linux/ppcle_64/protoc.exe</file> - <classifier>linux-ppcle_64</classifier> - <type>exe</type> - </artifact> - <artifact> - <file>${basedir}/target/linux/s390x_64/protoc.exe</file> - <classifier>linux-s390x_64</classifier> - <type>exe</type> - </artifact> - </artifacts> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - <profiles> - <profile> - <id>release</id> - <properties> - <!-- Specify the staging repository to deploy to. This can be left - empty for the first deployment, and Sonatype will create one. For - subsequent deployments it should be set to what Sonatype has - created, so that all deployments will go to the same repository. - --> - <staging.repository/> - </properties> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-gpg-plugin</artifactId> - <version>1.5</version> - <executions> - <execution> - <id>sign-artifacts</id> - <phase>verify</phase> - <goals> - <goal>sign</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.sonatype.plugins</groupId> - <artifactId>nexus-staging-maven-plugin</artifactId> - <version>1.6.3</version> - <extensions>true</extensions> - <configuration> - <serverId>sonatype-nexus-staging</serverId> - <nexusUrl>https://oss.sonatype.org/</nexusUrl> - <skipStagingRepositoryClose>true</skipStagingRepositoryClose> - <autoReleaseAfterClose>false</autoReleaseAfterClose> - <stagingRepositoryId>${staging.repository}</stagingRepositoryId> - </configuration> - </plugin> - </plugins> - </build> - </profile> - </profiles> -</project>
diff --git a/python/google/protobuf/__init__.py b/python/google/protobuf/__init__.py index 3566a7c..5a025af 100755 --- a/python/google/protobuf/__init__.py +++ b/python/google/protobuf/__init__.py
@@ -30,7 +30,7 @@ # Copyright 2007 Google Inc. All Rights Reserved. -__version__ = '3.10.0' +__version__ = '3.11.0rc0' if __name__ != '__main__': try:
diff --git a/python/google/protobuf/__init__.py.orig b/python/google/protobuf/__init__.py.orig deleted file mode 100755 index e9e9c29..0000000 --- a/python/google/protobuf/__init__.py.orig +++ /dev/null
@@ -1,43 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# https://developers.google.com/protocol-buffers/ -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Copyright 2007 Google Inc. All Rights Reserved. - -<<<<<<< HEAD -__version__ = '3.10.0rc0' -======= -__version__ = '3.10.0' ->>>>>>> 3.10.x - -if __name__ != '__main__': - try: - __import__('pkg_resources').declare_namespace(__name__) - except ImportError: - __path__ = __import__('pkgutil').extend_path(__path__, __name__)
diff --git a/ruby/google-protobuf.gemspec b/ruby/google-protobuf.gemspec index 3e90c8c..302352d 100644 --- a/ruby/google-protobuf.gemspec +++ b/ruby/google-protobuf.gemspec
@@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = "google-protobuf" - s.version = "3.10.0" + s.version = "3.11.0.rc.0" git_tag = "v#{s.version.to_s.sub('.rc.', '-rc')}" # Converts X.Y.Z.rc.N to vX.Y.Z-rcN, used for the git tag s.licenses = ["BSD-3-Clause"] s.summary = "Protocol Buffers"
diff --git a/ruby/google-protobuf.gemspec.orig b/ruby/google-protobuf.gemspec.orig deleted file mode 100644 index a5c96ad..0000000 --- a/ruby/google-protobuf.gemspec.orig +++ /dev/null
@@ -1,33 +0,0 @@ -Gem::Specification.new do |s| - s.name = "google-protobuf" -<<<<<<< HEAD - s.version = "3.10.0.rc.0" -======= - s.version = "3.10.0" ->>>>>>> 3.10.x - git_tag = "v#{s.version.to_s.sub('.rc.', '-rc')}" # Converts X.Y.Z.rc.N to vX.Y.Z-rcN, used for the git tag - s.licenses = ["BSD-3-Clause"] - s.summary = "Protocol Buffers" - s.description = "Protocol Buffers are Google's data interchange format." - s.homepage = "https://developers.google.com/protocol-buffers" - s.authors = ["Protobuf Authors"] - s.email = "protobuf@googlegroups.com" - s.metadata = { "source_code_uri" => "https://github.com/protocolbuffers/protobuf/tree/#{git_tag}/ruby" } - s.require_paths = ["lib"] - s.files = Dir.glob('lib/**/*.rb') - if RUBY_PLATFORM == "java" - s.platform = "java" - s.files += ["lib/google/protobuf_java.jar"] - else - s.files += Dir.glob('ext/**/*') - s.extensions= ["ext/google/protobuf_c/extconf.rb"] - s.add_development_dependency "rake-compiler-dock", "~> 0.6.0" - end - s.test_files = ["tests/basic.rb", - "tests/stress.rb", - "tests/generated_code_test.rb"] - s.required_ruby_version = '>= 2.3' - s.add_development_dependency "rake-compiler", "~> 0.9.5" - s.add_development_dependency "test-unit", '~> 3.0', '>= 3.0.9' - s.add_development_dependency "rubygems-tasks", "~> 0.2.4" -end
diff --git a/src/Makefile.am b/src/Makefile.am index 9f33a44..a5bd9ce 100644 --- a/src/Makefile.am +++ b/src/Makefile.am
@@ -18,7 +18,7 @@ PTHREAD_DEF = endif -PROTOBUF_VERSION = 21:0:0 +PROTOBUF_VERSION = 22:0:0 if GCC # Turn on all warnings except for sign comparison (we ignore sign comparison
diff --git a/src/google/protobuf/any.pb.h b/src/google/protobuf/any.pb.h index 87106ef..2ae3471 100644 --- a/src/google/protobuf/any.pb.h +++ b/src/google/protobuf/any.pb.h
@@ -8,12 +8,12 @@ #include <string> #include <google/protobuf/port_def.inc> -#if PROTOBUF_VERSION < 3010000 +#if PROTOBUF_VERSION < 3011000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3011000 < 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.
diff --git a/src/google/protobuf/api.pb.h b/src/google/protobuf/api.pb.h index 336c548..af7ab8c 100644 --- a/src/google/protobuf/api.pb.h +++ b/src/google/protobuf/api.pb.h
@@ -8,12 +8,12 @@ #include <string> #include <google/protobuf/port_def.inc> -#if PROTOBUF_VERSION < 3010000 +#if PROTOBUF_VERSION < 3011000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3011000 < 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.
diff --git a/src/google/protobuf/compiler/plugin.pb.h b/src/google/protobuf/compiler/plugin.pb.h index 4eaa903..ec70e03 100644 --- a/src/google/protobuf/compiler/plugin.pb.h +++ b/src/google/protobuf/compiler/plugin.pb.h
@@ -8,12 +8,12 @@ #include <string> #include <google/protobuf/port_def.inc> -#if PROTOBUF_VERSION < 3010000 +#if PROTOBUF_VERSION < 3011000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3011000 < 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.
diff --git a/src/google/protobuf/descriptor.pb.h b/src/google/protobuf/descriptor.pb.h index 59b85ec..6941e2e 100644 --- a/src/google/protobuf/descriptor.pb.h +++ b/src/google/protobuf/descriptor.pb.h
@@ -8,12 +8,12 @@ #include <string> #include <google/protobuf/port_def.inc> -#if PROTOBUF_VERSION < 3010000 +#if PROTOBUF_VERSION < 3011000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3011000 < 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.
diff --git a/src/google/protobuf/duration.pb.h b/src/google/protobuf/duration.pb.h index ecb6969..456d69f 100644 --- a/src/google/protobuf/duration.pb.h +++ b/src/google/protobuf/duration.pb.h
@@ -8,12 +8,12 @@ #include <string> #include <google/protobuf/port_def.inc> -#if PROTOBUF_VERSION < 3010000 +#if PROTOBUF_VERSION < 3011000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3011000 < 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.
diff --git a/src/google/protobuf/empty.pb.h b/src/google/protobuf/empty.pb.h index 488db4e..6f0ff98 100644 --- a/src/google/protobuf/empty.pb.h +++ b/src/google/protobuf/empty.pb.h
@@ -8,12 +8,12 @@ #include <string> #include <google/protobuf/port_def.inc> -#if PROTOBUF_VERSION < 3010000 +#if PROTOBUF_VERSION < 3011000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3011000 < 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.
diff --git a/src/google/protobuf/field_mask.pb.h b/src/google/protobuf/field_mask.pb.h index f948425..d38333b 100644 --- a/src/google/protobuf/field_mask.pb.h +++ b/src/google/protobuf/field_mask.pb.h
@@ -8,12 +8,12 @@ #include <string> #include <google/protobuf/port_def.inc> -#if PROTOBUF_VERSION < 3010000 +#if PROTOBUF_VERSION < 3011000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3011000 < 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.
diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc index 54716b3..da12de8 100644 --- a/src/google/protobuf/port_def.inc +++ b/src/google/protobuf/port_def.inc
@@ -295,14 +295,14 @@ // Shared google3/opensource definitions. ////////////////////////////////////// -#define PROTOBUF_VERSION 3010000 -#define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC 3010000 -#define PROTOBUF_MIN_PROTOC_VERSION 3010000 +#define PROTOBUF_VERSION 3011000 +#define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC 3011000 +#define PROTOBUF_MIN_PROTOC_VERSION 3011000 #define PROTOBUF_VERSION_SUFFIX "" // The minimum library version which works with the current version of the // headers. -#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION 3010000 +#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION 3011000 #if defined(GOOGLE_PROTOBUF_NO_RTTI) && GOOGLE_PROTOBUF_NO_RTTI #define PROTOBUF_RTTI 0
diff --git a/src/google/protobuf/source_context.pb.h b/src/google/protobuf/source_context.pb.h index 690530f..4aad4e2 100644 --- a/src/google/protobuf/source_context.pb.h +++ b/src/google/protobuf/source_context.pb.h
@@ -8,12 +8,12 @@ #include <string> #include <google/protobuf/port_def.inc> -#if PROTOBUF_VERSION < 3010000 +#if PROTOBUF_VERSION < 3011000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3011000 < 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.
diff --git a/src/google/protobuf/struct.pb.h b/src/google/protobuf/struct.pb.h index 3df0c97..4b399c0 100644 --- a/src/google/protobuf/struct.pb.h +++ b/src/google/protobuf/struct.pb.h
@@ -8,12 +8,12 @@ #include <string> #include <google/protobuf/port_def.inc> -#if PROTOBUF_VERSION < 3010000 +#if PROTOBUF_VERSION < 3011000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3011000 < 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.
diff --git a/src/google/protobuf/stubs/common.h b/src/google/protobuf/stubs/common.h index 2060878..4e11880 100644 --- a/src/google/protobuf/stubs/common.h +++ b/src/google/protobuf/stubs/common.h
@@ -81,7 +81,7 @@ // The current version, represented as a single integer to make comparison // easier: major * 10^6 + minor * 10^3 + micro -#define GOOGLE_PROTOBUF_VERSION 3010000 +#define GOOGLE_PROTOBUF_VERSION 3011000 // A suffix string for alpha, beta or rc releases. Empty for stable releases. #define GOOGLE_PROTOBUF_VERSION_SUFFIX "" @@ -89,15 +89,15 @@ // The minimum header version which works with the current version of // the library. This constant should only be used by protoc's C++ code // generator. -static const int kMinHeaderVersionForLibrary = 3010000; +static const int kMinHeaderVersionForLibrary = 3011000; // The minimum protoc version which works with the current version of the // headers. -#define GOOGLE_PROTOBUF_MIN_PROTOC_VERSION 3010000 +#define GOOGLE_PROTOBUF_MIN_PROTOC_VERSION 3011000 // The minimum header version which works with the current version of // protoc. This constant should only be used in VerifyVersion(). -static const int kMinHeaderVersionForProtoc = 3010000; +static const int kMinHeaderVersionForProtoc = 3011000; // Verifies that the headers and libraries are compatible. Use the macro // below to call this.
diff --git a/src/google/protobuf/timestamp.pb.h b/src/google/protobuf/timestamp.pb.h index d67d5cc..ec8a709 100644 --- a/src/google/protobuf/timestamp.pb.h +++ b/src/google/protobuf/timestamp.pb.h
@@ -8,12 +8,12 @@ #include <string> #include <google/protobuf/port_def.inc> -#if PROTOBUF_VERSION < 3010000 +#if PROTOBUF_VERSION < 3011000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3011000 < 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.
diff --git a/src/google/protobuf/type.pb.h b/src/google/protobuf/type.pb.h index 95a29a7..56d4d0c 100644 --- a/src/google/protobuf/type.pb.h +++ b/src/google/protobuf/type.pb.h
@@ -8,12 +8,12 @@ #include <string> #include <google/protobuf/port_def.inc> -#if PROTOBUF_VERSION < 3010000 +#if PROTOBUF_VERSION < 3011000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3011000 < 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.
diff --git a/src/google/protobuf/wrappers.pb.h b/src/google/protobuf/wrappers.pb.h index 7f1b9a9..95c7d6f 100644 --- a/src/google/protobuf/wrappers.pb.h +++ b/src/google/protobuf/wrappers.pb.h
@@ -8,12 +8,12 @@ #include <string> #include <google/protobuf/port_def.inc> -#if PROTOBUF_VERSION < 3010000 +#if PROTOBUF_VERSION < 3011000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3011000 < 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.