diff options
65 files changed, 2320 insertions, 2173 deletions
@@ -87,6 +87,19 @@ vsprojects/Release # Directories created by opening the Objective C Xcode projects. objectivec/ProtocolBuffers_OSX.xcodeproj/project.xcworkspace/xcuserdata/ +objectivec/ProtocolBuffers_OSX.xcodeproj/project.xcworkspace/xcshareddata/ProtocolBuffers_OSX.xccheckout objectivec/ProtocolBuffers_OSX.xcodeproj/xcuserdata/ objectivec/ProtocolBuffers_iOS.xcodeproj/project.xcworkspace/xcuserdata/ +objectivec/ProtocolBuffers_iOS.xcodeproj/project.xcworkspace/xcshareddata/ProtocolBuffers_iOS.xccheckout objectivec/ProtocolBuffers_iOS.xcodeproj/xcuserdata/ +# OS X's Finder creates these for state about opened windows/etc. +**/.DS_Store + +# Comformance test output +conformance/.libs/ +conformance/com/ +conformance/conformance-cpp +conformance/conformance-test-runner +conformance/conformance.pb.cc +conformance/conformance.pb.h +conformance/protoc_middleman diff --git a/Android.mk b/Android.mk deleted file mode 100644 index bbd15740..00000000 --- a/Android.mk +++ /dev/null @@ -1,492 +0,0 @@ -# Copyright (C) 2009 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# - -LOCAL_PATH := $(call my-dir) - -IGNORED_WARNINGS := -Wno-sign-compare -Wno-unused-parameter -Wno-sign-promo - -CC_LITE_SRC_FILES := \ - src/google/protobuf/stubs/common.cc \ - src/google/protobuf/stubs/once.cc \ - src/google/protobuf/stubs/hash.cc \ - src/google/protobuf/stubs/hash.h \ - src/google/protobuf/stubs/map-util.h \ - src/google/protobuf/stubs/stl_util-inl.h \ - src/google/protobuf/extension_set.cc \ - src/google/protobuf/generated_message_util.cc \ - src/google/protobuf/message_lite.cc \ - src/google/protobuf/repeated_field.cc \ - src/google/protobuf/wire_format_lite.cc \ - src/google/protobuf/io/coded_stream.cc \ - src/google/protobuf/io/coded_stream_inl.h \ - src/google/protobuf/io/zero_copy_stream.cc \ - src/google/protobuf/io/zero_copy_stream_impl_lite.cc - -JAVA_LITE_SRC_FILES := \ - java/src/main/java/com/google/protobuf/UninitializedMessageException.java \ - java/src/main/java/com/google/protobuf/MessageLite.java \ - java/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java \ - java/src/main/java/com/google/protobuf/CodedOutputStream.java \ - java/src/main/java/com/google/protobuf/ByteString.java \ - java/src/main/java/com/google/protobuf/CodedInputStream.java \ - java/src/main/java/com/google/protobuf/ExtensionRegistryLite.java \ - java/src/main/java/com/google/protobuf/AbstractMessageLite.java \ - java/src/main/java/com/google/protobuf/FieldSet.java \ - java/src/main/java/com/google/protobuf/Internal.java \ - java/src/main/java/com/google/protobuf/WireFormat.java \ - java/src/main/java/com/google/protobuf/GeneratedMessageLite.java - -COMPILER_SRC_FILES := \ - src/google/protobuf/descriptor.cc \ - src/google/protobuf/descriptor.pb.cc \ - src/google/protobuf/descriptor_database.cc \ - src/google/protobuf/dynamic_message.cc \ - src/google/protobuf/extension_set.cc \ - src/google/protobuf/extension_set_heavy.cc \ - src/google/protobuf/generated_message_reflection.cc \ - src/google/protobuf/generated_message_util.cc \ - src/google/protobuf/message.cc \ - src/google/protobuf/message_lite.cc \ - src/google/protobuf/reflection_ops.cc \ - src/google/protobuf/repeated_field.cc \ - src/google/protobuf/service.cc \ - src/google/protobuf/text_format.cc \ - src/google/protobuf/unknown_field_set.cc \ - src/google/protobuf/wire_format.cc \ - src/google/protobuf/wire_format_lite.cc \ - src/google/protobuf/compiler/code_generator.cc \ - src/google/protobuf/compiler/command_line_interface.cc \ - src/google/protobuf/compiler/importer.cc \ - src/google/protobuf/compiler/main.cc \ - src/google/protobuf/compiler/parser.cc \ - src/google/protobuf/compiler/plugin.cc \ - src/google/protobuf/compiler/plugin.pb.cc \ - src/google/protobuf/compiler/subprocess.cc \ - src/google/protobuf/compiler/zip_writer.cc \ - src/google/protobuf/compiler/cpp/cpp_enum.cc \ - src/google/protobuf/compiler/cpp/cpp_enum_field.cc \ - src/google/protobuf/compiler/cpp/cpp_extension.cc \ - src/google/protobuf/compiler/cpp/cpp_field.cc \ - src/google/protobuf/compiler/cpp/cpp_file.cc \ - src/google/protobuf/compiler/cpp/cpp_generator.cc \ - src/google/protobuf/compiler/cpp/cpp_helpers.cc \ - src/google/protobuf/compiler/cpp/cpp_message.cc \ - src/google/protobuf/compiler/cpp/cpp_message_field.cc \ - src/google/protobuf/compiler/cpp/cpp_primitive_field.cc \ - src/google/protobuf/compiler/cpp/cpp_service.cc \ - src/google/protobuf/compiler/cpp/cpp_string_field.cc \ - src/google/protobuf/compiler/java/java_enum.cc \ - src/google/protobuf/compiler/java/java_enum_field.cc \ - src/google/protobuf/compiler/java/java_enum_field_lite.cc \ - src/google/protobuf/compiler/java/java_extension.cc \ - src/google/protobuf/compiler/java/java_field.cc \ - src/google/protobuf/compiler/java/java_file.cc \ - src/google/protobuf/compiler/java/java_generator.cc \ - src/google/protobuf/compiler/java/java_helpers.cc \ - src/google/protobuf/compiler/java/java_message.cc \ - src/google/protobuf/compiler/java/java_message_lite.cc \ - src/google/protobuf/compiler/java/java_message_builder.cc \ - src/google/protobuf/compiler/java/java_message_builder_lite.cc \ - src/google/protobuf/compiler/java/java_message_field.cc \ - src/google/protobuf/compiler/java/java_message_field_lite.cc \ - src/google/protobuf/compiler/java/java_primitive_field.cc \ - src/google/protobuf/compiler/java/java_primitive_field_lite.cc \ - src/google/protobuf/compiler/java/java_service.cc \ - src/google/protobuf/compiler/javamicro/javamicro_enum.cc \ - src/google/protobuf/compiler/javamicro/javamicro_enum_field.cc \ - src/google/protobuf/compiler/javamicro/javamicro_field.cc \ - src/google/protobuf/compiler/javamicro/javamicro_file.cc \ - src/google/protobuf/compiler/javamicro/javamicro_generator.cc \ - src/google/protobuf/compiler/javamicro/javamicro_helpers.cc \ - src/google/protobuf/compiler/javamicro/javamicro_message.cc \ - src/google/protobuf/compiler/javamicro/javamicro_message_field.cc \ - src/google/protobuf/compiler/javamicro/javamicro_primitive_field.cc \ - src/google/protobuf/compiler/javanano/javanano_enum.cc \ - src/google/protobuf/compiler/javanano/javanano_enum_field.cc \ - src/google/protobuf/compiler/javanano/javanano_extension.cc \ - src/google/protobuf/compiler/javanano/javanano_field.cc \ - src/google/protobuf/compiler/javanano/javanano_file.cc \ - src/google/protobuf/compiler/javanano/javanano_generator.cc \ - src/google/protobuf/compiler/javanano/javanano_helpers.cc \ - src/google/protobuf/compiler/javanano/javanano_message.cc \ - src/google/protobuf/compiler/javanano/javanano_message_field.cc \ - src/google/protobuf/compiler/javanano/javanano_primitive_field.cc \ - src/google/protobuf/compiler/python/python_generator.cc \ - src/google/protobuf/io/coded_stream.cc \ - src/google/protobuf/io/gzip_stream.cc \ - src/google/protobuf/io/printer.cc \ - src/google/protobuf/io/tokenizer.cc \ - src/google/protobuf/io/zero_copy_stream.cc \ - src/google/protobuf/io/zero_copy_stream_impl.cc \ - src/google/protobuf/io/zero_copy_stream_impl_lite.cc \ - src/google/protobuf/stubs/common.cc \ - src/google/protobuf/stubs/hash.cc \ - src/google/protobuf/stubs/once.cc \ - src/google/protobuf/stubs/structurally_valid.cc \ - src/google/protobuf/stubs/strutil.cc \ - src/google/protobuf/stubs/substitute.cc - -# Java nano library (for device-side users) -# ======================================================= -include $(CLEAR_VARS) - -LOCAL_MODULE := libprotobuf-java-nano -LOCAL_MODULE_TAGS := optional -LOCAL_SDK_VERSION := 8 - -LOCAL_SRC_FILES := $(call all-java-files-under, java/src/main/java/com/google/protobuf/nano) -LOCAL_SRC_FILES += $(call all-java-files-under, java/src/device/main/java/com/google/protobuf/nano) - -include $(BUILD_STATIC_JAVA_LIBRARY) - -# Java nano library (for host-side users) -# ======================================================= -include $(CLEAR_VARS) - -LOCAL_MODULE := host-libprotobuf-java-nano -LOCAL_MODULE_TAGS := optional - -LOCAL_SRC_FILES := $(call all-java-files-under, java/src/main/java/com/google/protobuf/nano) - -include $(BUILD_HOST_JAVA_LIBRARY) - -# Java micro library (for device-side users) -# ======================================================= -include $(CLEAR_VARS) - -LOCAL_MODULE := libprotobuf-java-micro -LOCAL_MODULE_TAGS := optional -LOCAL_SDK_VERSION := 8 - -LOCAL_SRC_FILES := $(call all-java-files-under, java/src/main/java/com/google/protobuf/micro) - -include $(BUILD_STATIC_JAVA_LIBRARY) - -# Java micro library (for host-side users) -# ======================================================= -include $(CLEAR_VARS) - -LOCAL_MODULE := host-libprotobuf-java-micro -LOCAL_MODULE_TAGS := optional - -LOCAL_SRC_FILES := $(call all-java-files-under, java/src/main/java/com/google/protobuf/micro) - -include $(BUILD_HOST_JAVA_LIBRARY) - -# Java lite library (for device-side users) -# ======================================================= -include $(CLEAR_VARS) - -LOCAL_MODULE := libprotobuf-java-lite -LOCAL_MODULE_TAGS := optional -LOCAL_SDK_VERSION := 8 - -LOCAL_SRC_FILES := $(JAVA_LITE_SRC_FILES) - -include $(BUILD_STATIC_JAVA_LIBRARY) - -# Java lite library (for host-side users) -# ======================================================= -include $(CLEAR_VARS) - -LOCAL_MODULE := host-libprotobuf-java-lite -LOCAL_MODULE_TAGS := optional - -LOCAL_SRC_FILES := $(JAVA_LITE_SRC_FILES) - -include $(BUILD_HOST_JAVA_LIBRARY) - -# C++ lite library -# ======================================================= -include $(CLEAR_VARS) - -LOCAL_MODULE := libprotobuf-cpp-lite -LOCAL_MODULE_TAGS := optional - -LOCAL_CPP_EXTENSION := .cc - -LOCAL_SRC_FILES := $(CC_LITE_SRC_FILES) - -LOCAL_C_INCLUDES := \ - $(LOCAL_PATH)/android \ - $(LOCAL_PATH)/src - -# Define the header files to be copied -#LOCAL_COPY_HEADERS := \ -# src/google/protobuf/stubs/once.h \ -# src/google/protobuf/stubs/common.h \ -# src/google/protobuf/io/coded_stream.h \ -# src/google/protobuf/generated_message_util.h \ -# src/google/protobuf/repeated_field.h \ -# src/google/protobuf/extension_set.h \ -# src/google/protobuf/wire_format_lite_inl.h -# -#LOCAL_COPY_HEADERS_TO := $(LOCAL_MODULE) - -LOCAL_CFLAGS := -DGOOGLE_PROTOBUF_NO_RTTI $(IGNORED_WARNINGS) - -# These are the minimum versions and don't need to be update. -ifeq ($(TARGET_ARCH),arm) -LOCAL_SDK_VERSION := 8 -else -# x86/mips support only available from API 9. -LOCAL_SDK_VERSION := 9 -endif -LOCAL_NDK_STL_VARIANT := stlport_static - -include $(BUILD_STATIC_LIBRARY) - -# C++ lite library (libc++ flavored for the platform) -# ======================================================= -include $(CLEAR_VARS) - -LOCAL_MODULE := libprotobuf-cpp-lite -LOCAL_MODULE_TAGS := optional - -LOCAL_CPP_EXTENSION := .cc - -LOCAL_SRC_FILES := $(CC_LITE_SRC_FILES) - -LOCAL_C_INCLUDES := \ - $(LOCAL_PATH)/android \ - $(LOCAL_PATH)/src - -LOCAL_CFLAGS := -DGOOGLE_PROTOBUF_NO_RTTI $(IGNORED_WARNINGS) - -include $(BUILD_SHARED_LIBRARY) - -# C++ full library -# ======================================================= -protobuf_cc_full_src_files := \ - $(CC_LITE_SRC_FILES) \ - src/google/protobuf/stubs/strutil.cc \ - src/google/protobuf/stubs/strutil.h \ - src/google/protobuf/stubs/substitute.cc \ - src/google/protobuf/stubs/substitute.h \ - src/google/protobuf/stubs/structurally_valid.cc \ - src/google/protobuf/descriptor.cc \ - src/google/protobuf/descriptor.pb.cc \ - src/google/protobuf/descriptor_database.cc \ - src/google/protobuf/dynamic_message.cc \ - src/google/protobuf/extension_set_heavy.cc \ - src/google/protobuf/generated_message_reflection.cc \ - src/google/protobuf/message.cc \ - src/google/protobuf/reflection_ops.cc \ - src/google/protobuf/service.cc \ - src/google/protobuf/text_format.cc \ - src/google/protobuf/unknown_field_set.cc \ - src/google/protobuf/wire_format.cc \ - src/google/protobuf/io/gzip_stream.cc \ - src/google/protobuf/io/printer.cc \ - src/google/protobuf/io/tokenizer.cc \ - src/google/protobuf/io/zero_copy_stream_impl.cc \ - src/google/protobuf/compiler/importer.cc \ - src/google/protobuf/compiler/parser.cc - -# C++ full library - stlport version -# ======================================================= -include $(CLEAR_VARS) - -LOCAL_MODULE := libprotobuf-cpp-full -LOCAL_MODULE_TAGS := optional -LOCAL_CPP_EXTENSION := .cc -LOCAL_SRC_FILES := $(protobuf_cc_full_src_files) -LOCAL_C_INCLUDES := \ - $(LOCAL_PATH)/android \ - external/zlib \ - $(LOCAL_PATH)/src - -# Define the header files to be copied -#LOCAL_COPY_HEADERS := \ -# src/google/protobuf/stubs/once.h \ -# src/google/protobuf/stubs/common.h \ -# src/google/protobuf/io/coded_stream.h \ -# src/google/protobuf/generated_message_util.h \ -# src/google/protobuf/repeated_field.h \ -# src/google/protobuf/extension_set.h \ -# src/google/protobuf/wire_format_lite_inl.h -# -#LOCAL_COPY_HEADERS_TO := $(LOCAL_MODULE) - -LOCAL_CFLAGS := -DGOOGLE_PROTOBUF_NO_RTTI $(IGNORED_WARNINGS) - -# These are the minimum versions and don't need to be update. -ifeq ($(TARGET_ARCH),arm) -LOCAL_SDK_VERSION := 8 -else -# x86/mips support only available from API 9. -LOCAL_SDK_VERSION := 9 -endif -LOCAL_NDK_STL_VARIANT := stlport_static - -include $(BUILD_STATIC_LIBRARY) - -# C++ full library - Gnustl+rtti version -# ======================================================= -include $(CLEAR_VARS) - -LOCAL_MODULE := libprotobuf-cpp-full-gnustl-rtti -LOCAL_MODULE_TAGS := optional -LOCAL_CPP_EXTENSION := .cc -LOCAL_SRC_FILES := $(protobuf_cc_full_src_files) -LOCAL_C_INCLUDES := \ - $(LOCAL_PATH)/android \ - external/zlib \ - $(LOCAL_PATH)/src - -LOCAL_CFLAGS := -frtti $(IGNORED_WARNINGS) -LOCAL_SDK_VERSION := 14 -LOCAL_NDK_STL_VARIANT := gnustl_static - -include $(BUILD_STATIC_LIBRARY) - -# C++ full library - libc++ version for the platform -# ======================================================= -include $(CLEAR_VARS) - -LOCAL_MODULE := libprotobuf-cpp-full -LOCAL_MODULE_TAGS := optional -LOCAL_CPP_EXTENSION := .cc -LOCAL_SRC_FILES := $(protobuf_cc_full_src_files) -LOCAL_C_INCLUDES := \ - $(LOCAL_PATH)/android \ - external/zlib \ - $(LOCAL_PATH)/src - -LOCAL_CFLAGS := -DGOOGLE_PROTOBUF_NO_RTTI $(IGNORED_WARNINGS) -LOCAL_SHARED_LIBRARIES := libz - -include $(BUILD_SHARED_LIBRARY) - -# Clean temp vars -protobuf_cc_full_src_files := - - -# Android Protocol buffer compiler, aprotoc (host executable) -# used by the build systems as $(PROTOC) defined in -# build/core/config.mk -# ======================================================= -include $(CLEAR_VARS) - -LOCAL_MODULE := aprotoc -LOCAL_MODULE_CLASS := EXECUTABLES -LOCAL_MODULE_TAGS := optional - -LOCAL_CPP_EXTENSION := .cc -LOCAL_SRC_FILES := $(COMPILER_SRC_FILES) - -LOCAL_C_INCLUDES := \ - $(LOCAL_PATH)/android \ - external/zlib \ - $(LOCAL_PATH)/src - -LOCAL_STATIC_LIBRARIES += libz - -ifneq ($(HOST_OS),windows) -LOCAL_LDLIBS := -lpthread -endif - -LOCAL_CFLAGS := $(IGNORED_WARNINGS) - -include $(BUILD_HOST_EXECUTABLE) - -# To test java proto params build rules. -# ======================================================= -include $(CLEAR_VARS) - -LOCAL_MODULE := aprotoc-test-nano-params -LOCAL_MODULE_TAGS := tests -LOCAL_SDK_VERSION := current - -LOCAL_PROTOC_OPTIMIZE_TYPE := nano - -LOCAL_SRC_FILES := \ - src/google/protobuf/unittest_import_nano.proto \ - src/google/protobuf/unittest_simple_nano.proto \ - src/google/protobuf/unittest_stringutf8_nano.proto \ - src/google/protobuf/unittest_recursive_nano.proto - - -LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/src - -LOCAL_PROTO_JAVA_OUTPUT_PARAMS := \ - java_package = $(LOCAL_PATH)/src/google/protobuf/unittest_import_nano.proto|com.google.protobuf.nano, \ - java_outer_classname = $(LOCAL_PATH)/src/google/protobuf/unittest_import_nano.proto|UnittestImportNano - -include $(BUILD_STATIC_JAVA_LIBRARY) - -# To test Android-specific nanoproto features. -# ======================================================= -include $(CLEAR_VARS) - -# Parcelable messages -LOCAL_MODULE := android-nano-test-parcelable -LOCAL_MODULE_TAGS := tests -LOCAL_SDK_VERSION := current - -LOCAL_PROTOC_OPTIMIZE_TYPE := nano - -LOCAL_SRC_FILES := src/google/protobuf/unittest_simple_nano.proto - -LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/src - -LOCAL_PROTO_JAVA_OUTPUT_PARAMS := \ - parcelable_messages = true - -include $(BUILD_STATIC_JAVA_LIBRARY) - -include $(CLEAR_VARS) - -# Parcelable and extendable messages -LOCAL_MODULE := android-nano-test-parcelable-extendable -LOCAL_MODULE_TAGS := tests -LOCAL_SDK_VERSION := current - -LOCAL_PROTOC_OPTIMIZE_TYPE := nano - -LOCAL_SRC_FILES := src/google/protobuf/unittest_extension_nano.proto - -LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/src - -LOCAL_PROTO_JAVA_OUTPUT_PARAMS := \ - parcelable_messages = true, \ - store_unknown_fields = true - -include $(BUILD_STATIC_JAVA_LIBRARY) - -include $(CLEAR_VARS) - -# Test APK -LOCAL_PACKAGE_NAME := NanoAndroidTest - -LOCAL_SDK_VERSION := 8 - -LOCAL_MODULE_TAGS := tests - -LOCAL_SRC_FILES := $(call all-java-files-under, java/src/device/test/java/com/google/protobuf/nano) - -LOCAL_MANIFEST_FILE := java/src/device/test/AndroidManifest.xml - -LOCAL_STATIC_JAVA_LIBRARIES := libprotobuf-java-nano \ - android-nano-test-parcelable \ - android-nano-test-parcelable-extendable - -LOCAL_DEX_PREOPT := false - -include $(BUILD_PACKAGE) - -# 2.3.0 prebuilts for backwards compatibility. -include $(LOCAL_PATH)/prebuilts/Android.mk diff --git a/CHANGES.txt b/CHANGES.txt index ac42aa5a..846d735e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,103 @@ +2015-05-25 version 3.0.0-alpha-3 (Objective-C/C#): + General + * Introduced two new language implementations (Objective-C, C#) to proto3. + * Explicit "optional" keyword are disallowed in proto3 syntax, as fields are + optional by default. + * Group fields are no longer supported in proto3 syntax. + * Changed repeated primitive fields to use packed serialization by default in + proto3 (implemented for C++, Java, Python in this release). The user can + still disable packed serialization by setting packed to false for now. + * Added well-known type protos (any.proto, empty.proto, timestamp.proto, + duration.proto, etc.). Users can import and use these protos just like + regular proto files. Addtional runtime support will be added for them in + future releases (in the form of utility helper functions, or having them + replaced by language specific types in generated code). + * Added a "reserved" keyword in both proto2 and proto3 syntax. User can use + this keyword to declare reserved field numbers and names to prevent them + from being reused by other fields in the same message. + + To reserve field numbers, add a reserved declaration in your message: + + message TestMessage { + reserved 2, 15, 9 to 11, 3; + } + + This reserves field numbers 2, 3, 9, 10, 11 and 15. If a user uses any of + these as field numbers, the protocol buffer compiler will report an error. + + Field names can also be reserved: + + message TestMessage { + reserved "foo", "bar"; + } + + * Various bug fixes since 3.0.0-alpha-2 + + Objective-C + Objective-C includes a code generator and a native objective-c runtime + library. By adding “--objc_out” to protoc, the code generator will generate + a header(*.pbobjc.h) and an implementation file(*.pbobjc.m) for each proto + file. + + In this first release, the generated interface provides: enums, messages, + field support(single, repeated, map, oneof), proto2 and proto3 syntax + support, parsing and serialization. It’s compatible with ARC and non-ARC + usage. Besides, user can also access it via the swift bridging header. + + See objectivec/README.md for details. + + C# + * C# protobufs are based on project + https://github.com/jskeet/protobuf-csharp-port. The original project was + frozen and all the new development will happen here. + * Codegen plugin for C# was completely rewritten to C++ and is now an + intergral part of protoc. + * Some refactorings and cleanup has been applied to the C# runtime library. + * Only proto2 is supported in C# at the moment, proto3 support is in + progress and will likely bring significant breaking changes to the API. + + See csharp/README.md for details. + + C++ + * Added runtime support for Any type. To use Any in your proto file, first + import the definition of Any: + + // foo.proto + import "google/protobuf/any.proto"; + message Foo { + google.protobuf.Any any_field = 1; + } + message Bar { + int32 value = 1; + } + + Then in C++ you can access the Any field using PackFrom()/UnpackTo() + methods: + + Foo foo; + Bar bar = ...; + foo.mutable_any_field()->PackFrom(bar); + ... + if (foo.any_field().IsType<Bar>()) { + foo.any_field().UnpackTo(&bar); + ... + } + * In text format, entries of a map field will be sorted by key. + + Java + * Continued optimizations on the lite runtime to improve performance for + Android. + + Python + * Added map support. + - maps now have a dict-like interface (msg.map_field[key] = value) + - existing code that modifies maps via the repeated field interface + will need to be updated. + + Ruby + * Improvements to RepeatedField's emulation of the Ruby Array API. + * Various speedups and internal cleanups. + 2015-02-26 version 3.0.0-alpha-2 (Python/Ruby/JavaNano): General * Introduced three new language implementations (Ruby, JavaNano, and @@ -8,8 +8,6 @@ This license applies to all parts of Protocol Buffers except the following: src/google/protobuf/stubs/atomicops_internals_aix.h. This file is copyrighted by Bloomberg Finance LP. - - Andorid.mk, which is copyrighted by The Android Open Source Project. - Copyright 2014, Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/Makefile.am b/Makefile.am index d9535149..084fca6b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -39,6 +39,255 @@ clean-local: pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = protobuf.pc protobuf-lite.pc +csharp_EXTRA_DIST= \ + csharp/src/ProtocolBuffers.sln \ + csharp/src/ProtocolBuffersLite.Test/TestProtos/UnittestImportPublicLite.cs \ + csharp/src/ProtocolBuffersLite.Test/TestProtos/UnittestExtrasLite.cs \ + csharp/src/ProtocolBuffersLite.Test/TestProtos/UnittestExtrasFull.cs \ + csharp/src/ProtocolBuffersLite.Test/TestProtos/UnittestImport.cs \ + csharp/src/ProtocolBuffersLite.Test/TestProtos/UnittestLiteImportsNonlite.cs \ + csharp/src/ProtocolBuffersLite.Test/TestProtos/UnittestImportLite.cs \ + csharp/src/ProtocolBuffersLite.Test/TestProtos/Unittest.cs \ + csharp/src/ProtocolBuffersLite.Test/TestProtos/UnittestLite.cs \ + csharp/src/ProtocolBuffersLite.Test/TestProtos/UnittestImportPublic.cs \ + csharp/src/ProtocolBuffersLite.Test/ExtendableMessageLiteTest.cs \ + csharp/src/ProtocolBuffersLite.Test/packages.config \ + csharp/src/ProtocolBuffersLite.Test/LiteTest.cs \ + csharp/src/ProtocolBuffersLite.Test/AbstractMessageLiteTest.cs \ + csharp/src/ProtocolBuffersLite.Test/MissingFieldAndExtensionTest.cs \ + csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.csproj \ + csharp/src/ProtocolBuffersLite.Test/App.xaml.cs \ + csharp/src/ProtocolBuffersLite.Test/InteropLiteTest.cs \ + csharp/src/ProtocolBuffersLite.Test/ExtendableBuilderLiteTest.cs \ + csharp/src/ProtocolBuffersLite.Test/App.xaml \ + csharp/src/ProtocolBuffersLite.Test/TestLiteByApi.cs \ + csharp/src/ProtocolBuffersLite.Test/Properties/AppManifest.xml \ + csharp/src/ProtocolBuffersLite.Test/Properties/OutOfBrowserSettings.xml \ + csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.csproj \ + csharp/src/ProtocolBuffersLite.Test/AbstractBuilderLiteTest.cs \ + csharp/src/ProtoDump/ProtoDump.csproj \ + csharp/src/ProtoDump/app.config \ + csharp/src/ProtoDump/Program.cs \ + csharp/src/ProtoDump/Properties/AssemblyInfo.cs \ + csharp/src/ProtocolBuffers.Serialization/AbstractReader.cs \ + csharp/src/ProtocolBuffers.Serialization/JsonFormatReader.cs \ + csharp/src/ProtocolBuffers.Serialization/JsonTextCursor.cs \ + csharp/src/ProtocolBuffers.Serialization/ProtocolBuffers.Serialization.csproj \ + csharp/src/ProtocolBuffers.Serialization/DictionaryWriter.cs \ + csharp/src/ProtocolBuffers.Serialization/AbstractWriter.cs \ + csharp/src/ProtocolBuffers.Serialization/ProtocolBuffersLite.Serialization.csproj \ + csharp/src/ProtocolBuffers.Serialization/XmlReaderOptions.cs \ + csharp/src/ProtocolBuffers.Serialization/AbstractTextReader.cs \ + csharp/src/ProtocolBuffers.Serialization/XmlWriterOptions.cs \ + csharp/src/ProtocolBuffers.Serialization/JsonFormatWriter.cs \ + csharp/src/ProtocolBuffers.Serialization/Properties/AssemblyInfo.cs \ + csharp/src/ProtocolBuffers.Serialization/DictionaryReader.cs \ + csharp/src/ProtocolBuffers.Serialization/Extensions.cs \ + csharp/src/ProtocolBuffers.Serialization/AbstractTextWriter.cs \ + csharp/src/ProtocolBuffers.Serialization/XmlFormatWriter.cs \ + csharp/src/ProtocolBuffers.Serialization/Http/FormUrlEncodedReader.cs \ + csharp/src/ProtocolBuffers.Serialization/Http/MessageFormatOptions.cs \ + csharp/src/ProtocolBuffers.Serialization/Http/MessageFormatFactory.cs \ + csharp/src/ProtocolBuffers.Serialization/XmlFormatReader.cs \ + csharp/src/ProtocolBuffers.Serialization/RecursionLimitExceeded.cs \ + csharp/src/ProtoBench/GoogleSize.cs \ + csharp/src/ProtoBench/GoogleSpeed.cs \ + csharp/src/ProtoBench/UnittestImport.cs \ + csharp/src/ProtoBench/google_message1.dat \ + csharp/src/ProtoBench/ProtoBench.csproj \ + csharp/src/ProtoBench/app.config \ + csharp/src/ProtoBench/Program.cs \ + csharp/src/ProtoBench/google_message2.dat \ + csharp/src/ProtoBench/Properties/AssemblyInfo.cs \ + csharp/src/ProtoBench/Unittest.cs \ + csharp/src/ProtoBench/UnittestImportPublic.cs \ + csharp/src/ProtoMunge/app.config \ + csharp/src/ProtoMunge/Program.cs \ + csharp/src/ProtoMunge/Properties/AssemblyInfo.cs \ + csharp/src/ProtoMunge/ProtoMunge.csproj \ + csharp/src/ProtocolBuffers/GeneratedMessage.cs \ + csharp/src/ProtocolBuffers/ICodedInputStream.cs \ + csharp/src/ProtocolBuffers/AbstractBuilder.cs \ + csharp/src/ProtocolBuffers/FieldSet.cs \ + csharp/src/ProtocolBuffers/TextGenerator.cs \ + csharp/src/ProtocolBuffers/CodedInputStream.cs \ + csharp/src/ProtocolBuffers/GeneratedExtensionLite.cs \ + csharp/src/ProtocolBuffers/FrameworkPortability.cs \ + csharp/src/ProtocolBuffers/SortedList.cs \ + csharp/src/ProtocolBuffers/CodedOutputStream.ComputeSize.cs \ + csharp/src/ProtocolBuffers/ExtendableMessage.cs \ + csharp/src/ProtocolBuffers/Descriptors/ServiceDescriptor.cs \ + csharp/src/ProtocolBuffers/Descriptors/DescriptorBase.cs \ + csharp/src/ProtocolBuffers/Descriptors/EnumDescriptor.cs \ + csharp/src/ProtocolBuffers/Descriptors/PackageDescriptor.cs \ + csharp/src/ProtocolBuffers/Descriptors/FileDescriptor.cs \ + csharp/src/ProtocolBuffers/Descriptors/DescriptorValidationException.cs \ + csharp/src/ProtocolBuffers/Descriptors/IndexedDescriptorBase.cs \ + csharp/src/ProtocolBuffers/Descriptors/MessageDescriptor.cs \ + csharp/src/ProtocolBuffers/Descriptors/MethodDescriptor.cs \ + csharp/src/ProtocolBuffers/Descriptors/DescriptorUtil.cs \ + csharp/src/ProtocolBuffers/Descriptors/MappedType.cs \ + csharp/src/ProtocolBuffers/Descriptors/FieldType.cs \ + csharp/src/ProtocolBuffers/Descriptors/FieldMappingAttribute.cs \ + csharp/src/ProtocolBuffers/Descriptors/IDescriptor.cs \ + csharp/src/ProtocolBuffers/Descriptors/EnumValueDescriptor.cs \ + csharp/src/ProtocolBuffers/Descriptors/FieldDescriptor.cs \ + csharp/src/ProtocolBuffers/Descriptors/DescriptorPool.cs \ + csharp/src/ProtocolBuffers/Delegates.cs \ + csharp/src/ProtocolBuffers/AbstractMessageLite.cs \ + csharp/src/ProtocolBuffers/IMessageLite.cs \ + csharp/src/ProtocolBuffers/TextFormat.cs \ + csharp/src/ProtocolBuffers/Collections/Enumerables.cs \ + csharp/src/ProtocolBuffers/Collections/PopsicleList.cs \ + csharp/src/ProtocolBuffers/Collections/IPopsicleList.cs \ + csharp/src/ProtocolBuffers/Collections/ReadOnlyDictionary.cs \ + csharp/src/ProtocolBuffers/Collections/Dictionaries.cs \ + csharp/src/ProtocolBuffers/Collections/Lists.cs \ + csharp/src/ProtocolBuffers/IMessage.cs \ + csharp/src/ProtocolBuffers/TextTokenizer.cs \ + csharp/src/ProtocolBuffers/ByteString.cs \ + csharp/src/ProtocolBuffers/AbstractBuilderLite.cs \ + csharp/src/ProtocolBuffers/GeneratedExtensionBase.cs \ + csharp/src/ProtocolBuffers/EnumLite.cs \ + csharp/src/ProtocolBuffers/ByteArray.cs \ + csharp/src/ProtocolBuffers/ExtensionInfo.cs \ + csharp/src/ProtocolBuffers/MessageStreamIterator.cs \ + csharp/src/ProtocolBuffers/DynamicMessage.cs \ + csharp/src/ProtocolBuffers/ExtendableMessageLite.cs \ + csharp/src/ProtocolBuffers/ICodedOutputStream.cs \ + csharp/src/ProtocolBuffers/GeneratedRepeatExtension.cs \ + csharp/src/ProtocolBuffers/IBuilderLite.cs \ + csharp/src/ProtocolBuffers/UnknownField.cs \ + csharp/src/ProtocolBuffers/ThrowHelper.cs \ + csharp/src/ProtocolBuffers/UnknownFieldSet.cs \ + csharp/src/ProtocolBuffers/AbstractMessage.cs \ + csharp/src/ProtocolBuffers/GeneratedBuilderLite.cs \ + csharp/src/ProtocolBuffers/NameHelpers.cs \ + csharp/src/ProtocolBuffers/DescriptorProtos/PartialClasses.cs \ + csharp/src/ProtocolBuffers/DescriptorProtos/IDescriptorProto.cs \ + csharp/src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs \ + csharp/src/ProtocolBuffers/ExtendableBuilder.cs \ + csharp/src/ProtocolBuffers/FieldAccess/IFieldAccessor.cs \ + csharp/src/ProtocolBuffers/FieldAccess/SinglePrimitiveAccessor.cs \ + csharp/src/ProtocolBuffers/FieldAccess/SingleEnumAccessor.cs \ + csharp/src/ProtocolBuffers/FieldAccess/RepeatedPrimitiveAccessor.cs \ + csharp/src/ProtocolBuffers/FieldAccess/FieldAccessorTable.cs \ + csharp/src/ProtocolBuffers/FieldAccess/RepeatedMessageAccessor.cs \ + csharp/src/ProtocolBuffers/FieldAccess/RepeatedEnumAccessor.cs \ + csharp/src/ProtocolBuffers/FieldAccess/ReflectionUtil.cs \ + csharp/src/ProtocolBuffers/FieldAccess/SingleMessageAccessor.cs \ + csharp/src/ProtocolBuffers/Properties/AssemblyInfo.cs \ + csharp/src/ProtocolBuffers/IBuilder.cs \ + csharp/src/ProtocolBuffers/ExtensionRegistry.cs \ + csharp/src/ProtocolBuffers/CodedOutputStream.cs \ + csharp/src/ProtocolBuffers/MessageStreamWriter.cs \ + csharp/src/ProtocolBuffers/MessageUtil.cs \ + csharp/src/ProtocolBuffers/UninitializedMessageException.cs \ + csharp/src/ProtocolBuffers/ProtocolBuffersLite.csproj \ + csharp/src/ProtocolBuffers/InvalidProtocolBufferException.cs \ + csharp/src/ProtocolBuffers/ProtocolBuffers.csproj \ + csharp/src/ProtocolBuffers/ExtendableBuilderLite.cs \ + csharp/src/ProtocolBuffers/GeneratedMessageLite.cs \ + csharp/src/ProtocolBuffers/GeneratedSingleExtension.cs \ + csharp/src/ProtocolBuffers/ExtensionRegistryLite.cs \ + csharp/src/ProtocolBuffers/WireFormat.cs \ + csharp/src/ProtocolBuffers/GeneratedBuilder.cs \ + csharp/src/AddressBook/ListPeople.cs \ + csharp/src/AddressBook/Addressbook.cs \ + csharp/src/AddressBook/AddPerson.cs \ + csharp/src/AddressBook/AddressBook.csproj \ + csharp/src/AddressBook/SampleUsage.cs \ + csharp/src/AddressBook/app.config \ + csharp/src/AddressBook/Program.cs \ + csharp/src/AddressBook/Properties/AssemblyInfo.cs \ + csharp/src/packages/repositories.config \ + csharp/src/ProtocolBuffers.Test/AbstractMessageTest.cs \ + csharp/src/ProtocolBuffers.Test/TestProtos/GoogleSize.cs \ + csharp/src/ProtocolBuffers.Test/TestProtos/GoogleSpeed.cs \ + csharp/src/ProtocolBuffers.Test/TestProtos/UnittestEnormousDescriptor.cs \ + csharp/src/ProtocolBuffers.Test/TestProtos/UnknownEnumTest.cs \ + csharp/src/ProtocolBuffers.Test/TestProtos/UnittestMset.cs \ + csharp/src/ProtocolBuffers.Test/TestProtos/UnittestImport.cs \ + csharp/src/ProtocolBuffers.Test/TestProtos/UnittestCustomOptions.cs \ + csharp/src/ProtocolBuffers.Test/TestProtos/UnittestOptimizeFor.cs \ + csharp/src/ProtocolBuffers.Test/TestProtos/UnittestNoFieldPresence.cs \ + csharp/src/ProtocolBuffers.Test/TestProtos/Unittest.cs \ + csharp/src/ProtocolBuffers.Test/TestProtos/UnittestIssues.cs \ + csharp/src/ProtocolBuffers.Test/TestProtos/UnittestExtrasXmltest.cs \ + csharp/src/ProtocolBuffers.Test/TestProtos/UnittestImportPublic.cs \ + csharp/src/ProtocolBuffers.Test/TestProtos/UnittestDropUnknownFields.cs \ + csharp/src/ProtocolBuffers.Test/CodedInputStreamTest.cs \ + csharp/src/ProtocolBuffers.Test/packages.config \ + csharp/src/ProtocolBuffers.Test/TestReaderForUrlEncoded.cs \ + csharp/src/ProtocolBuffers.Test/ByteStringTest.cs \ + csharp/src/ProtocolBuffers.Test/ReusableBuilderTest.cs \ + csharp/src/ProtocolBuffers.Test/TestUtil.cs \ + csharp/src/ProtocolBuffers.Test/TestResources.cs \ + csharp/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs \ + csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj \ + csharp/src/ProtocolBuffers.Test/IssuesTest.cs \ + csharp/src/ProtocolBuffers.Test/UnknownFieldSetTest.cs \ + csharp/src/ProtocolBuffers.Test/TestMimeMessageFormats.cs \ + csharp/src/ProtocolBuffers.Test/App.xaml.cs \ + csharp/src/ProtocolBuffers.Test/DeprecatedMemberTest.cs \ + csharp/src/ProtocolBuffers.Test/DynamicMessageTest.cs \ + csharp/src/ProtocolBuffers.Test/MessageStreamWriterTest.cs \ + csharp/src/ProtocolBuffers.Test/NameHelpersTest.cs \ + csharp/src/ProtocolBuffers.Test/GeneratedMessageTest.cs \ + csharp/src/ProtocolBuffers.Test/TestWriterFormatXml.cs \ + csharp/src/ProtocolBuffers.Test/ExtendableMessageTest.cs \ + csharp/src/ProtocolBuffers.Test/WireFormatTest.cs \ + csharp/src/ProtocolBuffers.Test/TestWriterFormatJson.cs \ + csharp/src/ProtocolBuffers.Test/MessageUtilTest.cs \ + csharp/src/ProtocolBuffers.Test/App.xaml \ + csharp/src/ProtocolBuffers.Test/Properties/AppManifest.xml \ + csharp/src/ProtocolBuffers.Test/Properties/AssemblyInfo.cs \ + csharp/src/ProtocolBuffers.Test/Properties/OutOfBrowserSettings.xml \ + csharp/src/ProtocolBuffers.Test/TextFormatTest.cs \ + csharp/src/ProtocolBuffers.Test/CodedOutputStreamTest.cs \ + csharp/src/ProtocolBuffers.Test/MessageTest.cs \ + csharp/src/ProtocolBuffers.Test/DescriptorsTest.cs \ + csharp/src/ProtocolBuffers.Test/Compatibility/DictionaryCompatibilityTests.cs \ + csharp/src/ProtocolBuffers.Test/Compatibility/JsonCompatibilityTests.cs \ + csharp/src/ProtocolBuffers.Test/Compatibility/TextCompatibilityTests.cs \ + csharp/src/ProtocolBuffers.Test/Compatibility/TestResources.cs \ + csharp/src/ProtocolBuffers.Test/Compatibility/google_message1.dat \ + csharp/src/ProtocolBuffers.Test/Compatibility/CompatibilityTests.cs \ + csharp/src/ProtocolBuffers.Test/Compatibility/google_message2.dat \ + csharp/src/ProtocolBuffers.Test/Compatibility/XmlCompatibilityTests.cs \ + csharp/src/ProtocolBuffers.Test/Compatibility/BinaryCompatibilityTests.cs \ + csharp/src/ProtocolBuffers.Test/GeneratedBuilderTest.cs \ + csharp/src/ProtocolBuffers.Test/ReflectionTester.cs \ + csharp/src/ProtocolBuffers.Test/FieldPresenceTest.cs \ + csharp/src/ProtocolBuffers.Test/TestCornerCases.cs \ + csharp/src/ProtocolBuffers.Test/MessageStreamIteratorTest.cs \ + csharp/buildall.sh \ + csharp/README.md \ + csharp/.gitignore \ + csharp/protos/extest/unittest_extras_lite.proto \ + csharp/protos/extest/unittest_extras_xmltest.proto \ + csharp/protos/extest/unittest_extras_full.proto \ + csharp/protos/extest/unittest_issues.proto \ + csharp/generate_protos.sh \ + csharp/CHANGES.txt \ + csharp/keys/generate_new_key.bat \ + csharp/keys/Google.ProtocolBuffers.snk \ + csharp/testdata/golden_message \ + csharp/testdata/text_format_unittest_data.txt \ + csharp/testdata/golden_packed_fields_message \ + csharp/testdata/text_format_unittest_extensions_data.txt \ + csharp/build/build.bat \ + csharp/build/googlecode_upload.py \ + csharp/build/build.csproj \ + csharp/build/Google.ProtocolBuffersLite.nuspec \ + csharp/build/Common.targets \ + csharp/build/Google.ProtocolBuffers.nuspec \ + csharp/build/target.csproj \ + csharp/build/nuspec.xsd \ + csharp/build/BuildAll.bat \ + csharp/build/RunBenchmarks.bat \ + csharp/build/publish.csproj + java_EXTRA_DIST= \ java/src/main/java/com/google/protobuf/AbstractMessage.java \ java/src/main/java/com/google/protobuf/AbstractMessageLite.java \ @@ -101,6 +350,7 @@ java_EXTRA_DIST= \ java/src/main/java/com/google/protobuf/UnknownFieldSetLite.java \ java/src/main/java/com/google/protobuf/UnmodifiableLazyStringList.java \ java/src/main/java/com/google/protobuf/Utf8.java \ + java/src/test/java/com/google/protobuf/WellKnownTypesTest.java \ java/src/main/java/com/google/protobuf/WireFormat.java \ java/src/test/java/com/google/protobuf/AbstractMessageTest.java \ java/src/test/java/com/google/protobuf/BoundedByteStringTest.java \ @@ -155,6 +405,7 @@ java_EXTRA_DIST= \ java/src/test/java/com/google/protobuf/lite_equals_and_hash.proto \ java/src/test/java/com/google/protobuf/map_for_proto2_lite_test.proto \ java/src/test/java/com/google/protobuf/map_for_proto2_test.proto \ + java/src/test/java/com/google/protobuf/map_initialization_order_test.proto \ java/src/test/java/com/google/protobuf/map_test.proto \ java/src/test/java/com/google/protobuf/multiple_files_test.proto \ java/src/test/java/com/google/protobuf/nested_builders_test.proto \ @@ -169,6 +420,7 @@ java_EXTRA_DIST= \ java/src/test/java/com/google/protobuf/test_check_utf8.proto \ java/src/test/java/com/google/protobuf/test_check_utf8_size.proto \ java/src/test/java/com/google/protobuf/test_custom_options.proto \ + java/src/test/java/com/google/protobuf/test_extra_interfaces.proto \ java/pom.xml \ java/README.md @@ -213,15 +465,32 @@ javanano_EXTRA_DIST= objectivec_EXTRA_DIST= \ objectivec/DevTools/check_version_stamps.sh \ + objectivec/DevTools/full_mac_build.sh \ objectivec/DevTools/pddm.py \ objectivec/DevTools/pddm_tests.py \ objectivec/generate_descriptors_proto.sh \ + objectivec/google/protobuf/Any.pbobjc.h \ + objectivec/google/protobuf/Any.pbobjc.m \ + objectivec/google/protobuf/Api.pbobjc.h \ + objectivec/google/protobuf/Api.pbobjc.m \ objectivec/google/protobuf/Descriptor.pbobjc.h \ objectivec/google/protobuf/Descriptor.pbobjc.m \ objectivec/google/protobuf/Duration.pbobjc.h \ objectivec/google/protobuf/Duration.pbobjc.m \ + objectivec/google/protobuf/Empty.pbobjc.h \ + objectivec/google/protobuf/Empty.pbobjc.m \ + objectivec/google/protobuf/FieldMask.pbobjc.h \ + objectivec/google/protobuf/FieldMask.pbobjc.m \ + objectivec/google/protobuf/SourceContext.pbobjc.h \ + objectivec/google/protobuf/SourceContext.pbobjc.m \ + objectivec/google/protobuf/Struct.pbobjc.h \ + objectivec/google/protobuf/Struct.pbobjc.m \ objectivec/google/protobuf/Timestamp.pbobjc.h \ objectivec/google/protobuf/Timestamp.pbobjc.m \ + objectivec/google/protobuf/Type.pbobjc.h \ + objectivec/google/protobuf/Type.pbobjc.m \ + objectivec/google/protobuf/Wrappers.pbobjc.h \ + objectivec/google/protobuf/Wrappers.pbobjc.m \ objectivec/GPBArray.h \ objectivec/GPBArray.m \ objectivec/GPBArray_PackagePrivate.h \ @@ -277,6 +546,7 @@ objectivec_EXTRA_DIST= \ objectivec/ProtocolBuffers_OSX.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings \ objectivec/ProtocolBuffers_OSX.xcodeproj/xcshareddata/xcschemes/PerformanceTests.xcscheme \ objectivec/ProtocolBuffers_OSX.xcodeproj/xcshareddata/xcschemes/ProtocolBuffers.xcscheme \ + objectivec/README.md \ objectivec/Tests/Filter1.txt \ objectivec/Tests/Filter2.txt \ objectivec/Tests/golden_message \ @@ -311,15 +581,15 @@ objectivec_EXTRA_DIST= \ objectivec/Tests/GPBWireFormatTests.m \ objectivec/Tests/iOSTestHarness/AppDelegate.m \ objectivec/Tests/iOSTestHarness/en.lproj/InfoPlist.strings \ - objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/Contents.json \ - objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/iPad6.png \ - objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/iPad6@2x.png \ - objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/iPad7.png \ - objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/iPad7@2x.png \ - objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/iPhone6.png \ - objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/iPhone6@2x.png \ - objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/iPhone7@2x.png \ - objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/iPhone7@3x.png \ + objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/Contents.json \ + objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/iPad6.png \ + objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/iPad6@2x.png \ + objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/iPad7.png \ + objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/iPad7@2x.png \ + objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/iPhone6.png \ + objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/iPhone6@2x.png \ + objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/iPhone7@2x.png \ + objectivec/Tests/iOSTestHarness/Images.xcassets/AppIcon.appiconset/iPhone7@3x.png \ objectivec/Tests/iOSTestHarness/Images.xcassets/LaunchImage.launchimage/Contents.json \ objectivec/Tests/iOSTestHarness/Info.plist \ objectivec/Tests/iOSTestHarness/LaunchScreen.xib \ @@ -336,6 +606,7 @@ objectivec_EXTRA_DIST= \ Protobuf.podspec python_EXTRA_DIST= \ + python/MANIFEST.in \ python/google/protobuf/internal/api_implementation.cc \ python/google/protobuf/internal/api_implementation.py \ python/google/protobuf/internal/containers.py \ @@ -387,6 +658,8 @@ python_EXTRA_DIST= \ python/google/protobuf/pyext/extension_dict.cc \ python/google/protobuf/pyext/message.h \ python/google/protobuf/pyext/message.cc \ + python/google/protobuf/pyext/message_map_container.cc \ + python/google/protobuf/pyext/message_map_container.h \ python/google/protobuf/pyext/proto2_api_test.proto \ python/google/protobuf/pyext/python.proto \ python/google/protobuf/pyext/python_protobuf.h \ @@ -394,6 +667,8 @@ python_EXTRA_DIST= \ python/google/protobuf/pyext/repeated_composite_container.cc \ python/google/protobuf/pyext/repeated_scalar_container.h \ python/google/protobuf/pyext/repeated_scalar_container.cc \ + python/google/protobuf/pyext/scalar_map_container.cc \ + python/google/protobuf/pyext/scalar_map_container.h \ python/google/protobuf/pyext/scoped_pyobject_ptr.h \ python/google/protobuf/pyext/__init__.py \ python/google/protobuf/descriptor.py \ @@ -417,6 +692,9 @@ python_EXTRA_DIST= \ python/README.md ruby_EXTRA_DIST= \ + ruby/Gemfile \ + ruby/Gemfile.lock \ + ruby/.gitignore \ ruby/README.md \ ruby/Rakefile \ ruby/ext/google/protobuf_c/defs.c \ @@ -431,14 +709,37 @@ ruby_EXTRA_DIST= \ ruby/ext/google/protobuf_c/upb.c \ ruby/ext/google/protobuf_c/upb.h \ ruby/google-protobuf.gemspec \ + ruby/lib/google/protobuf/message_exts.rb \ + ruby/lib/google/protobuf/repeated_field.rb \ ruby/lib/google/protobuf.rb \ + ruby/pom.xml \ + ruby/src/main/java/com/google/protobuf/jruby/RubyBuilder.java \ + ruby/src/main/java/com/google/protobuf/jruby/RubyDescriptor.java \ + ruby/src/main/java/com/google/protobuf/jruby/RubyDescriptorPool.java \ + ruby/src/main/java/com/google/protobuf/jruby/RubyEnumBuilderContext.java \ + ruby/src/main/java/com/google/protobuf/jruby/RubyEnumDescriptor.java \ + ruby/src/main/java/com/google/protobuf/jruby/RubyEnum.java \ + ruby/src/main/java/com/google/protobuf/jruby/RubyFieldDescriptor.java \ + ruby/src/main/java/com/google/protobuf/jruby/RubyMap.java \ + ruby/src/main/java/com/google/protobuf/jruby/RubyMessageBuilderContext.java \ + ruby/src/main/java/com/google/protobuf/jruby/RubyMessage.java \ + ruby/src/main/java/com/google/protobuf/jruby/RubyOneofBuilderContext.java \ + ruby/src/main/java/com/google/protobuf/jruby/RubyOneofDescriptor.java \ + ruby/src/main/java/com/google/protobuf/jruby/RubyProtobuf.java \ + ruby/src/main/java/com/google/protobuf/jruby/RubyRepeatedField.java \ + ruby/src/main/java/com/google/protobuf/jruby/SentinelOuterClass.java \ + ruby/src/main/java/com/google/protobuf/jruby/Utils.java \ + ruby/src/main/java/google/ProtobufJavaService.java \ + ruby/src/main/sentinel.proto \ ruby/tests/basic.rb \ + ruby/tests/repeated_field_test.rb \ ruby/tests/stress.rb \ ruby/tests/generated_code.proto \ ruby/tests/generated_code.rb \ - ruby/tests/generated_code_test.rb + ruby/tests/generated_code_test.rb \ + ruby/travis-test.sh -all_EXTRA_DIST=$(java_EXTRA_DIST) $(javanano_EXTRA_DIST) $(objectivec_EXTRA_DIST) $(python_EXTRA_DIST) $(ruby_EXTRA_DIST) +all_EXTRA_DIST=$(csharp_EXTRA_DIST) $(java_EXTRA_DIST) $(javanano_EXTRA_DIST) $(objectivec_EXTRA_DIST) $(python_EXTRA_DIST) $(ruby_EXTRA_DIST) EXTRA_DIST = $(@DIST_LANG@_EXTRA_DIST) \ autogen.sh \ diff --git a/Protobuf.podspec b/Protobuf.podspec index 5c154a57..6fe77f88 100644 --- a/Protobuf.podspec +++ b/Protobuf.podspec @@ -1,3 +1,8 @@ +# 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' s.version = '3.0.0' @@ -6,14 +11,25 @@ Pod::Spec.new do |s| s.license = 'New BSD' s.authors = { 'The Protocol Buffers contributors' => 'protobuf@googlegroups.com' } - s.source_files = 'objectivec/*.{h,m}', 'objectivec/google/protobuf/*.pbobjc.h', 'objectivec/google/protobuf/Descriptor.pbobjc.m' - # The following is a .m umbrella file, and would cause duplicate symbol - # definitions: - s.exclude_files = 'objectivec/GPBProtocolBuffers.m' - # The .m's of the proto Well-Known-Types under google/protobuf are #imported - # by GPBWellKnownTypes.m. So we can't compile them (duplicate symbols), but we - # need them available for the importing: - s.preserve_paths = 'objectivec/google/protobuf/*.pbobjc.m' + s.source_files = 'objectivec/*.{h,m}', + 'objectivec/google/protobuf/Any.pbobjc.{h,m}', + 'objectivec/google/protobuf/Descriptor.pbobjc.{h,m}', + 'objectivec/google/protobuf/Duration.pbobjc.h', + 'objectivec/google/protobuf/Empty.pbobjc.{h,m}', + 'objectivec/google/protobuf/FieldMask.pbobjc.{h,m}', + 'objectivec/google/protobuf/SourceContext.pbobjc.{h,m}', + 'objectivec/google/protobuf/Timestamp.pbobjc.h', + 'objectivec/google/protobuf/Wrappers.pbobjc.{h,m}' + # Timestamp.pbobjc.m and Duration.pbobjc.m are #imported by GPBWellKnownTypes.m. So we can't + # compile them (duplicate symbols), but we need them available for the importing: + s.preserve_paths = 'objectivec/google/protobuf/Duration.pbobjc.m', + 'objectivec/google/protobuf/Timestamp.pbobjc.m' + # The following would cause duplicate symbol definitions. GPBProtocolBuffers is expected to be + # left out, as it's an umbrella implementation file. For Api, Struct and Type, see issue #449. + s.exclude_files = 'objectivec/GPBProtocolBuffers.m', + 'objectivec/google/protobuf/Api.pbobjc.{h,m}', + 'objectivec/google/protobuf/Struct.pbobjc.{h,m}', + 'objectivec/google/protobuf/Type.pbobjc.{h,m}' s.header_mappings_dir = 'objectivec' s.ios.deployment_target = '6.0' diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt new file mode 100644 index 00000000..02bba4c9 --- /dev/null +++ b/cmake/CMakeLists.txt @@ -0,0 +1,72 @@ +cmake_minimum_required(VERSION 2.8) + +project(protobuf C CXX) + +option(BUILD_TESTING "Build tests" ON) +option(BUILD_SHARED_LIBS "Build Shared Libraries" OFF) +if (MSVC) + option(ZLIB "Build with zlib support" OFF) +endif (MSVC) + +find_package(Threads REQUIRED) +if (CMAKE_USE_PTHREADS_INIT) + set(HAVE_PTHREAD 1) +else (CMAKE_USE_PTHREADS_INIT) + set(HAVE_PTHREAD 0) +endif (CMAKE_USE_PTHREADS_INIT) + +if (MSVC) + if (ZLIB) + set(HAVE_ZLIB 1) + find_path(ZLIB_INCLUDE_DIRECTORIES zlib.h ${protobuf_SOURCE_DIR}) + find_library(ZLIB_LIBRARIES zdll ${protobuf_SOURCE_DIR}) + else (ZLIB) + set(HAVE_ZLIB 0) + endif (ZLIB) +else (MSVC) + find_package(ZLIB) + if (ZLIB_FOUND) + set(HAVE_ZLIB 1) + else (ZLIB_FOUND) + set(HAVE_ZLIB 0) + # Explicitly set these to empty (override NOT_FOUND) so cmake doesn't + # complain when we use them later. + set(ZLIB_INCLUDE_DIRECTORIES) + set(ZLIB_LIBRARIES) + endif (ZLIB_FOUND) +endif (MSVC) + +if (MSVC) + if (BUILD_SHARED_LIBS) + add_definitions(-DPROTOBUF_USE_DLLS) + endif (BUILD_SHARED_LIBS) + add_definitions(/wd4244 /wd4267 /wd4018 /wd4355 /wd4800 /wd4251 /wd4996 /wd4146 /wd4305) +endif (MSVC) + +include(find_hash_map.cmake) + +configure_file(config.h.in config.h) +configure_file(pbconfig.h.in google/protobuf/stubs/pbconfig.h) + +get_filename_component(protobuf_source_dir ${protobuf_SOURCE_DIR} PATH) + +include_directories( + ${ZLIB_INCLUDE_DIRECTORIES} + ${protobuf_BINARY_DIR} + ${protobuf_source_dir}/src) + +if (MSVC) + # Add the "lib" prefix for generated .lib outputs. + set(LIB_PREFIX lib) +else (MSVC) + # When building with "make", "lib" prefix will be added automatically by + # the build tool. + set(LIB_PREFIX) +endif (MSVC) + +include(libprotobuf-lite.cmake) +include(libprotobuf.cmake) +include(libprotoc.cmake) +if (BUILD_TESTING) + include(protoc.cmake) +endif (BUILD_TESTING) diff --git a/cmake/README.md b/cmake/README.md new file mode 100644 index 00000000..02798b63 --- /dev/null +++ b/cmake/README.md @@ -0,0 +1,127 @@ +This directory contains cmake files that can be used to generate MSVC project +files in order to build protobuf on windows. You need to have cmake installed +on your computer before proceeding. + +Compiling and Installing +======================== + +1. Check whether a gtest directory exists in the upper level directory. If + you checkout the code from github via "git clone", this gtest directory + won't exist and you won't be able to build the tests described below. To + avoid this problem consider downloading one of the release tar balls which + contains gtest already and copying the gest directory from there to your + protobuf directory: + + https://github.com/google/protobuf/releases + +2. Use cmake to generate MSVC project files. Running the following commands + in a command shell will generate project files for Visual Studio 2008 in + a sub-directory named "build". + + $ cd path/to/protobuf/cmake + $ mkdir build + $ cd build + $ cmake -G "Visual Studio 9 2008" .. + +3. Open the generated protobuf.sln file in Microsoft Visual Studio. +4. Choose "Debug" or "Release" configuration as desired. +5. From the Build menu, choose "Build Solution". Wait for compiling to finish. +6. From a command shell, run tests.exe and lite-test.exe and check that all + tests pass. Make sure you have changed the working directory to the output + directory because tests.exe will try to find and run test_plugin.exe + in the working directory. +7. Run extract_includes.bat to copy all the public headers into a separate + "include" directory (under the top-level package directory). +8. Copy the contents of the include directory to wherever you want to put + headers. +9. Copy protoc.exe wherever you put build tools (probably somewhere in your + PATH). +10. Copy libprotobuf.lib, libprotobuf-lite.lib, and libprotoc.lib wherever you + put libraries. + + To avoid conflicts between the MSVC debug and release runtime libraries, when + compiling a debug build of your application, you may need to link against a + debug build of libprotobuf.lib. Similarly, release builds should link against + release libs. + +DLLs vs. static linking +======================= + +Static linking is now the default for the Protocol Buffer libraries. Due to +issues with Win32's use of a separate heap for each DLL, as well as binary +compatibility issues between different versions of MSVC's STL library, it is +recommended that you use static linkage only. However, it is possible to +build libprotobuf and libprotoc as DLLs if you really want. To do this, +do the following: + + 1. Add an additional flag "-DBUILD_SHARED_LIBS=ON" when invoking cmake: + + $ cmake -G "Visual Studio 9 2008" -DBUILD_SHARED_LIBS=ON .. + + 2. Follow the same steps as described in the above section. + 3. When compiling your project, make sure to #define PROTOBUF_USE_DLLS. + +When distributing your software to end users, we strongly recommend that you +do NOT install libprotobuf.dll or libprotoc.dll to any shared location. +Instead, keep these libraries next to your binaries, in your application's +own install directory. C++ makes it very difficult to maintain binary +compatibility between releases, so it is likely that future versions of these +libraries will *not* be usable as drop-in replacements. + +If your project is itself a DLL intended for use by third-party software, we +recommend that you do NOT expose protocol buffer objects in your library's +public interface, and that you statically link protocol buffers into your +library. + +ZLib support +============ + +If you want to include GzipInputStream and GzipOutputStream +(google/protobuf/io/gzip_stream.h) in libprotobuf, you will need to do a few +additional steps: + +1. Obtain a copy of the zlib library. The pre-compiled DLL at zlib.net works. +2. Make sure zlib's two headers are in your include path and that the .lib file + is in your library path. You could place all three files directly into this + cmake directory to compile libprotobuf, but they need to be visible to + your own project as well, so you should probably just put them into the + VC shared icnlude and library directories. +3. Add flag "-DZLIB=ON" when invoking cmake: + + $ cmake -G "Visual Studio 9 2008" -DZLIB=ON .. + + If it reports NOTFOUND for zlib_include or zlib_lib, you might haven't put + the headers or the .lib file in the right directory. +4) Open the generated protobuf.sln file and build as usual. + +Notes on Compiler Warnings +========================== + +The following warnings have been disabled while building the protobuf libraries +and compiler. You may have to disable some of them in your own project as +well, or live with them. + +* C4018 - 'expression' : signed/unsigned mismatch +* C4146 - unary minus operator applied to unsigned type, result still unsigned +* C4244 - Conversion from 'type1' to 'type2', possible loss of data. +* C4251 - 'identifier' : class 'type' needs to have dll-interface to be used by + clients of class 'type2' +* C4267 - Conversion from 'size_t' to 'type', possible loss of data. +* C4305 - 'identifier' : truncation from 'type1' to 'type2' +* C4355 - 'this' : used in base member initializer list +* C4800 - 'type' : forcing value to bool 'true' or 'false' (performance warning) +* C4996 - 'function': was declared deprecated + +C4251 is of particular note, if you are compiling the Protocol Buffer library +as a DLL (see previous section). The protocol buffer library uses templates in +its public interfaces. MSVC does not provide any reasonable way to export +template classes from a DLL. However, in practice, it appears that exporting +templates is not necessary anyway. Since the complete definition of any +template is available in the header files, anyone importing the DLL will just +end up compiling instances of the templates into their own binary. The +Protocol Buffer implementation does not rely on static template members being +unique, so there should be no problem with this, but MSVC prints warning +nevertheless. So, we disable it. Unfortunately, this warning will also be +produced when compiling code which merely uses protocol buffers, meaning you +may have to disable it in your code too. + diff --git a/cmake/config.h.in b/cmake/config.h.in new file mode 100644 index 00000000..bca1cbba --- /dev/null +++ b/cmake/config.h.in @@ -0,0 +1,4 @@ +#define GOOGLE_PROTOBUF_CMAKE_BUILD + +#define HAVE_PTHREAD ${HAVE_PTHREAD} +#define HAVE_ZLIB ${HAVE_ZLIB} diff --git a/cmake/find_hash_map.cmake b/cmake/find_hash_map.cmake new file mode 100644 index 00000000..22796fb8 --- /dev/null +++ b/cmake/find_hash_map.cmake @@ -0,0 +1,119 @@ +include(CheckCXXSourceCompiles) + +function(find_hash_map) + set(HAVE_HASH_MAP 1 PARENT_SCOPE) + set(HAVE_HASH_SET 1 PARENT_SCOPE) + # Search for hash_map in the following order: + # 1. <unordered_map> ::std::unordered_map + # 2. <tr1/unordered_map> ::std::tr1::unordered_map + # 3. <hash_map> ::hash_map + # 4. <hash_map> ::stdext::hash_map + # 5. <ext/hash_map> ::std::hash_map + # 6. <ext/hash_map> ::__gnu_cxx::hash_map + check_cxx_source_compiles(" + #include <unordered_map> + int main() { ::std::unordered_map<int, int> v; return v[0]; } + " HAS_STD_UNORDERED_MAP) + if (HAS_STD_UNORDERED_MAP) + set(HASH_NAMESPACE ::std PARENT_SCOPE) + set(HASH_MAP_H <unordered_map> PARENT_SCOPE) + set(HASH_MAP_CLASS unordered_map PARENT_SCOPE) + set(HASH_SET_H <unordered_set> PARENT_SCOPE) + set(HASH_SET_CLASS unordered_set PARENT_SCOPE) + return() + endif (HAS_STD_UNORDERED_MAP) + + check_cxx_source_compiles(" + #include <tr1/unordered_map> + int main() { ::std::tr1::unordered_map<int, int> v; return v[0]; } + " HAS_STD_TR1_UNORDERED_MAP) + if (HAS_STD_TR1_UNORDERED_MAP) + set(HASH_NAMESPACE ::std::tr1 PARENT_SCOPE) + set(HASH_MAP_H <tr1/unordered_map> PARENT_SCOPE) + set(HASH_MAP_CLASS unordered_map PARENT_SCOPE) + set(HASH_SET_H <tr1/unordered_set> PARENT_SCOPE) + set(HASH_SET_CLASS unordered_set PARENT_SCOPE) + return() + endif (HAS_STD_TR1_UNORDERED_MAP) + + check_cxx_source_compiles(" + #include <hash_map> + int main() { ::hash_map<int, int> v; return v[0]; } + " HAS_HASH_MAP) + if (HAS_HASH_MAP) + set(HASH_NAMESPACE :: PARENT_SCOPE) + set(HASH_MAP_H <hash_map> PARENT_SCOPE) + set(HASH_MAP_CLASS hash_map PARENT_SCOPE) + set(HASH_SET_H <hash_set> PARENT_SCOPE) + set(HASH_SET_CLASS hash_set PARENT_SCOPE) + return() + endif (HAS_HASH_MAP) + + check_cxx_source_compiles(" + #include <hash_map> + int main() { ::stdext::hash_map<int, int> v; return v[0]; } + " HAS_STDEXT_HASH_MAP) + if (HAS_STDEXT_HASH_MAP) + set(HASH_NAMESPACE ::stdext PARENT_SCOPE) + set(HASH_MAP_H <hash_map> PARENT_SCOPE) + set(HASH_MAP_CLASS hash_map PARENT_SCOPE) + set(HASH_SET_H <hash_set> PARENT_SCOPE) + set(HASH_SET_CLASS hash_set PARENT_SCOPE) + return() + endif (HAS_STDEXT_HASH_MAP) + + check_cxx_source_compiles(" + #include <ext/hash_map> + int main() { ::std::hash_map<int, int> v; return v[0]; } + " HAS_STD_HASH_MAP) + if (HAS_STD_HASH_MAP) + set(HASH_NAMESPACE ::std PARENT_SCOPE) + set(HASH_MAP_H <ext/hash_map> PARENT_SCOPE) + set(HASH_MAP_CLASS hash_map PARENT_SCOPE) + set(HASH_SET_H <ext/hash_set> PARENT_SCOPE) + set(HASH_SET_CLASS hash_set PARENT_SCOPE) + return() + endif (HAS_STD_HASH_MAP) + + check_cxx_source_compiles(" + #include <ext/hash_map> + int main() { ::__gnu_cxx::hash_map<int, int> v; return v[0]; } + " HAS_GNU_CXX_HASH_MAP) + if (HAS_GNU_CXX_HASH_MAP) + set(HASH_NAMESPACE ::gnu_cxx PARENT_SCOPE) + set(HASH_MAP_H <ext/hash_map> PARENT_SCOPE) + set(HASH_MAP_CLASS hash_map PARENT_SCOPE) + set(HASH_SET_H <ext/hash_set> PARENT_SCOPE) + set(HASH_SET_CLASS hash_set PARENT_SCOPE) + return() + endif (HAS_GNU_CXX_HASH_MAP) + + set(HAVE_HASH_MAP 0 PARENT_SCOPE) + set(HAVE_HASH_SET 0 PARENT_SCOPE) +endfunction() + +function(find_hash_compare) + if (MSVC) + check_cxx_source_compiles(" + #include ${HASH_MAP_H} + int main() { ::std::hash_compare<int> cp; return cp(0); } + " HAS_STD_HASH_COMPARE) + if (HAS_STD_HASH_COMPARE) + set(HASH_COMPARE ::std::hash_compare PARENT_SCOPE) + return() + endif (HAS_STD_HASH_COMPARE) + + check_cxx_source_compiles(" + #include ${HASH_MAP_H} + int main() { ::stdext::hash_compare<int> cp; return cp(0); } + " HAS_STDEXT_HASH_COMPARE) + if (HAS_STDEXT_HASH_COMPARE) + set(HASH_COMPARE ::stdext::hash_compare PARENT_SCOPE) + return() + endif (HAS_STDEXT_HASH_COMPARE) + endif (MSVC) + set(HASH_COMPARE PARENT_SCOPE) +endfunction() + +find_hash_map() +find_hash_compare() diff --git a/cmake/libprotobuf-lite.cmake b/cmake/libprotobuf-lite.cmake new file mode 100644 index 00000000..32c2d026 --- /dev/null +++ b/cmake/libprotobuf-lite.cmake @@ -0,0 +1,23 @@ +set(libprotobuf_lite_files + ${protobuf_source_dir}/src/google/protobuf/arena.cc + ${protobuf_source_dir}/src/google/protobuf/arenastring.cc + ${protobuf_source_dir}/src/google/protobuf/extension_set.cc + ${protobuf_source_dir}/src/google/protobuf/generated_message_util.cc + ${protobuf_source_dir}/src/google/protobuf/io/coded_stream.cc + ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream.cc + ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_impl_lite.cc + ${protobuf_source_dir}/src/google/protobuf/message_lite.cc + ${protobuf_source_dir}/src/google/protobuf/repeated_field.cc + ${protobuf_source_dir}/src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc + ${protobuf_source_dir}/src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc + ${protobuf_source_dir}/src/google/protobuf/stubs/common.cc + ${protobuf_source_dir}/src/google/protobuf/stubs/once.cc + ${protobuf_source_dir}/src/google/protobuf/stubs/stringprintf.cc + ${protobuf_source_dir}/src/google/protobuf/wire_format_lite.cc +) + +add_library(libprotobuf-lite ${libprotobuf_lite_files}) +target_link_libraries(libprotobuf-lite ${CMAKE_THREAD_LIBS_INIT}) +set_target_properties(libprotobuf-lite PROPERTIES + COMPILE_DEFINITIONS LIBPROTOBUF_EXPORTS + OUTPUT_NAME ${LIB_PREFIX}protobuf-lite) diff --git a/cmake/libprotobuf.cmake b/cmake/libprotobuf.cmake new file mode 100644 index 00000000..b1f2dc3e --- /dev/null +++ b/cmake/libprotobuf.cmake @@ -0,0 +1,42 @@ +set(libprotobuf_files + ${protobuf_source_dir}/src/google/protobuf/any.cc + ${protobuf_source_dir}/src/google/protobuf/any.pb.cc + ${protobuf_source_dir}/src/google/protobuf/api.pb.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/importer.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/parser.cc + ${protobuf_source_dir}/src/google/protobuf/descriptor.cc + ${protobuf_source_dir}/src/google/protobuf/descriptor.pb.cc + ${protobuf_source_dir}/src/google/protobuf/descriptor_database.cc + ${protobuf_source_dir}/src/google/protobuf/duration.pb.cc + ${protobuf_source_dir}/src/google/protobuf/dynamic_message.cc + ${protobuf_source_dir}/src/google/protobuf/empty.pb.cc + ${protobuf_source_dir}/src/google/protobuf/extension_set_heavy.cc + ${protobuf_source_dir}/src/google/protobuf/field_mask.pb.cc + ${protobuf_source_dir}/src/google/protobuf/generated_message_reflection.cc + ${protobuf_source_dir}/src/google/protobuf/io/gzip_stream.cc + ${protobuf_source_dir}/src/google/protobuf/io/printer.cc + ${protobuf_source_dir}/src/google/protobuf/io/strtod.cc + ${protobuf_source_dir}/src/google/protobuf/io/tokenizer.cc + ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_impl.cc + ${protobuf_source_dir}/src/google/protobuf/map_field.cc + ${protobuf_source_dir}/src/google/protobuf/message.cc + ${protobuf_source_dir}/src/google/protobuf/reflection_ops.cc + ${protobuf_source_dir}/src/google/protobuf/service.cc + ${protobuf_source_dir}/src/google/protobuf/source_context.pb.cc + ${protobuf_source_dir}/src/google/protobuf/struct.pb.cc + ${protobuf_source_dir}/src/google/protobuf/stubs/structurally_valid.cc + ${protobuf_source_dir}/src/google/protobuf/stubs/strutil.cc + ${protobuf_source_dir}/src/google/protobuf/stubs/substitute.cc + ${protobuf_source_dir}/src/google/protobuf/text_format.cc + ${protobuf_source_dir}/src/google/protobuf/timestamp.pb.cc + ${protobuf_source_dir}/src/google/protobuf/type.pb.cc + ${protobuf_source_dir}/src/google/protobuf/unknown_field_set.cc + ${protobuf_source_dir}/src/google/protobuf/wire_format.cc + ${protobuf_source_dir}/src/google/protobuf/wrappers.pb.cc +) + +add_library(libprotobuf ${libprotobuf_lite_files} ${libprotobuf_files}) +target_link_libraries(libprotobuf ${CMAKE_THREAD_LIBS_INIT} ${ZLIB_LIBRARIES}) +set_target_properties(libprotobuf PROPERTIES + COMPILE_DEFINITIONS LIBPROTOBUF_EXPORTS + OUTPUT_NAME ${LIB_PREFIX}protobuf) diff --git a/cmake/libprotoc.cmake b/cmake/libprotoc.cmake new file mode 100644 index 00000000..8caa9e9e --- /dev/null +++ b/cmake/libprotoc.cmake @@ -0,0 +1,95 @@ +set(libprotoc_files + ${protobuf_source_dir}/src/google/protobuf/compiler/code_generator.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/command_line_interface.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_enum.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_enum_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_extension.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_file.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_generator.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_helpers.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_map_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_message.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_message_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_service.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_string_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_enum.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_enum_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_extension.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_field_base.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_generator.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_helpers.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_message.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_message_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_umbrella_class.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_writer.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_context.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_doc_comment.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_field_lite.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_extension.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_file.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_generator.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_generator_factory.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_helpers.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_lazy_message_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_lazy_message_field_lite.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_map_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_map_field_lite.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_builder.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_builder_lite.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_field_lite.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_lite.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_name_resolver.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_primitive_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_primitive_field_lite.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_service.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_shared_code_generator.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_string_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_string_field_lite.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_enum.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_enum_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_extension.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_file.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_generator.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_helpers.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_map_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_message.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_message_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_primitive_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_extension.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_file.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_generator.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_message.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_oneof.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/plugin.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/plugin.pb.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/python/python_generator.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/ruby/ruby_generator.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/subprocess.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/zip_writer.cc +) + +add_library(libprotoc ${libprotoc_files}) +target_link_libraries(libprotoc libprotobuf) +set_target_properties(libprotoc PROPERTIES + COMPILE_DEFINITIONS LIBPROTOC_EXPORTS + OUTPUT_NAME ${LIB_PREFIX}protoc) diff --git a/cmake/pbconfig.h.in b/cmake/pbconfig.h.in new file mode 100644 index 00000000..fdc59686 --- /dev/null +++ b/cmake/pbconfig.h.in @@ -0,0 +1,9 @@ +#define GOOGLE_PROTOBUF_HAVE_HASH_MAP ${HAVE_HASH_MAP} +#define GOOGLE_PROTOBUF_HAVE_HASH_SET ${HAVE_HASH_MAP} + +#define GOOGLE_PROTOBUF_HASH_NAMESPACE ${HASH_NAMESPACE} +#define GOOGLE_PROTOBUF_HASH_MAP_H ${HASH_MAP_H} +#define GOOGLE_PROTOBUF_HASH_MAP_CLASS ${HASH_MAP_CLASS} +#define GOOGLE_PROTOBUF_HASH_SET_H ${HASH_SET_H} +#define GOOGLE_PROTOBUF_HASH_SET_CLASS ${HASH_SET_CLASS} +#define GOOGLE_PROTOBUF_HASH_COMPARE ${HASH_COMPARE} diff --git a/cmake/protoc.cmake b/cmake/protoc.cmake new file mode 100644 index 00000000..4f07c389 --- /dev/null +++ b/cmake/protoc.cmake @@ -0,0 +1,6 @@ +set(protoc_files + ${protobuf_source_dir}/src/google/protobuf/compiler/main.cc +) + +add_executable(protoc ${protoc_files}) +target_link_libraries(protoc libprotobuf libprotoc) diff --git a/cmake/tests.cmake b/cmake/tests.cmake new file mode 100644 index 00000000..24891521 --- /dev/null +++ b/cmake/tests.cmake @@ -0,0 +1,148 @@ +include_directories( + ${protobuf_source_dir}/gtest/include + ${protobuf_source_dir}/gtest) + +add_library(gtest STATIC ${protobuf_source_dir}/gtest/src/gtest-all.cc) +add_library(gtest_main STATIC ${protobuf_source_dir}/gtest/src/gtest_main.cc) +target_link_libraries(gtest_main gtest) + +set(lite_test_protos + google/protobuf/map_lite_unittest.proto + google/protobuf/unittest_import_lite.proto + google/protobuf/unittest_import_public_lite.proto + google/protobuf/unittest_lite.proto +) + +set(tests_protos + google/protobuf/any_test.proto + google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto + google/protobuf/compiler/cpp/cpp_test_large_enum_value.proto + google/protobuf/map_proto2_unittest.proto + google/protobuf/map_unittest.proto + google/protobuf/unittest.proto + google/protobuf/unittest_arena.proto + google/protobuf/unittest_custom_options.proto + google/protobuf/unittest_drop_unknown_fields.proto + google/protobuf/unittest_embed_optimize_for.proto + google/protobuf/unittest_empty.proto + google/protobuf/unittest_import.proto + google/protobuf/unittest_import_public.proto + google/protobuf/unittest_lite_imports_nonlite.proto + google/protobuf/unittest_mset.proto + google/protobuf/unittest_no_arena.proto + google/protobuf/unittest_no_arena_import.proto + google/protobuf/unittest_no_field_presence.proto + google/protobuf/unittest_no_generic_services.proto + google/protobuf/unittest_optimize_for.proto + google/protobuf/unittest_preserve_unknown_enum.proto + google/protobuf/unittest_preserve_unknown_enum2.proto + google/protobuf/unittest_proto3_arena.proto + google/protobuf/unittest_well_known_types.proto +) + +macro(compile_proto_file filename) + get_filename_component(dirname ${filename} PATH) + get_filename_component(basename ${filename} NAME_WE) + add_custom_command( + OUTPUT ${protobuf_source_dir}/src/${dirname}/${basename}.pb.cc + COMMAND protoc ${protobuf_source_dir}/src/${dirname}/${basename}.proto + --proto_path=${protobuf_source_dir}/src + --cpp_out=${protobuf_source_dir}/src + DEPENDS protoc + ) +endmacro(compile_proto_file) + +set(lite_test_proto_files) +foreach(proto_file ${lite_test_protos}) + compile_proto_file(${proto_file}) + string(REPLACE .proto .pb.cc pb_file ${proto_file}) + set(lite_test_proto_files ${lite_test_proto_files} + ${protobuf_source_dir}/src/${pb_file}) +endforeach(proto_file) + +set(tests_proto_files) +foreach(proto_file ${tests_protos}) + compile_proto_file(${proto_file}) + string(REPLACE .proto .pb.cc pb_file ${proto_file}) + set(tests_proto_files ${tests_proto_files} + ${protobuf_source_dir}/src/${pb_file}) +endforeach(proto_file) + +set(common_test_files + ${protobuf_source_dir}/src/google/protobuf/arena_test_util.cc + ${protobuf_source_dir}/src/google/protobuf/map_test_util.cc + ${protobuf_source_dir}/src/google/protobuf/test_util.cc + ${protobuf_source_dir}/src/google/protobuf/testing/file.cc + ${protobuf_source_dir}/src/google/protobuf/testing/googletest.cc +) + +set(tests_files + ${protobuf_source_dir}/src/google/protobuf/any_test.cc + ${protobuf_source_dir}/src/google/protobuf/arena_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/arenastring_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/command_line_interface_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_generator_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/importer_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_doc_comment_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_plugin_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/mock_code_generator.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_helpers_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/parser_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/python/python_plugin_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/descriptor_database_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/descriptor_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/drop_unknown_fields_test.cc + ${protobuf_source_dir}/src/google/protobuf/dynamic_message_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/extension_set_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/generated_message_reflection_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/io/coded_stream_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/io/printer_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/io/tokenizer_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/map_field_test.cc + ${protobuf_source_dir}/src/google/protobuf/map_test.cc + ${protobuf_source_dir}/src/google/protobuf/message_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/no_field_presence_test.cc + ${protobuf_source_dir}/src/google/protobuf/preserve_unknown_enum_test.cc + ${protobuf_source_dir}/src/google/protobuf/proto3_arena_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/reflection_ops_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/repeated_field_reflection_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/repeated_field_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/stubs/common_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/stubs/once_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/stubs/stringprintf_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/stubs/structurally_valid_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/stubs/strutil_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/stubs/template_util_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/stubs/type_traits_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/text_format_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/unknown_field_set_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/well_known_types_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/wire_format_unittest.cc +) + +add_executable(tests ${tests_files} ${common_test_files} ${tests_proto_files} ${lite_test_proto_files}) +target_link_libraries(tests libprotoc libprotobuf gtest_main) + +set(test_plugin_files + ${protobuf_source_dir}/src/google/protobuf/compiler/mock_code_generator.cc + ${protobuf_source_dir}/src/google/protobuf/testing/file.cc + ${protobuf_source_dir}/src/google/protobuf/testing/file.h + ${protobuf_source_dir}/src/google/protobuf/compiler/test_plugin.cc +) + +add_executable(test_plugin ${test_plugin_files}) +target_link_libraries(test_plugin libprotoc libprotobuf gtest) + +set(lite_test_files + ${protobuf_source_dir}/src/google/protobuf/arena_test_util.cc + ${protobuf_source_dir}/src/google/protobuf/lite_unittest.cc + ${protobuf_source_dir}/src/google/protobuf/map_lite_test_util.cc + ${protobuf_source_dir}/src/google/protobuf/test_util_lite.cc +) +add_executable(lite-test ${lite_test_files} ${lite_test_proto_files}) +target_link_libraries(lite-test libprotobuf-lite) diff --git a/cmake/update_file_lists.sh b/cmake/update_file_lists.sh new file mode 100644 index 00000000..d64eb4ae --- /dev/null +++ b/cmake/update_file_lists.sh @@ -0,0 +1,114 @@ +#!/bin/sh + +# This script copies source file lists from src/Makefile.am to cmake files. + +get_variable_value() { + FILENAME=$1 + VARNAME=$2 + awk " + BEGIN { start = 0; } + /^$VARNAME =/ { start = 1; } + { if (start) { print \$0; } } + /\\\\\$/ { next; } + { start = 0; } + " $FILENAME \ + | sed "s/^$VARNAME =//" \ + | sed "s/[ \\]//g" \ + | grep -v "^\\$" \ + | grep -v "^$" \ + | LC_ALL=C sort | uniq +} + +get_source_files() { + get_variable_value $@ | grep "cc$" +} + +get_proto_files() { + get_variable_value $@ | grep "pb.cc$" | sed "s/pb.cc/proto/" +} + +set_variable_value() { + FILENAME=$1 + VARNAME=$2 + PREFIX=$3 + shift + shift + shift + awk -v values="$*" -v prefix="$PREFIX" " + BEGIN { start = 0; } + /^set\\($VARNAME/ { + start = 1; + print \$0; + split(values, vlist, \" \"); + for (i = 1; i <= length(vlist); ++i) { + printf(\" %s%s\\n\", prefix, vlist[i]); + } + next; + } + start && /^\\)/ { + start = 0; + } + !start { + print \$0; + } + " $FILENAME > /tmp/$$ + cp /tmp/$$ $FILENAME +} + +sort_files() { + for FILE in $@; do + echo $FILE + done | sort | uniq +} + +MAKEFILE=../src/Makefile.am +CMAKE_DIR=. +EXTRACT_INCLUDES_BAT=../vsprojects/extract_includes.bat + +[ -f "$MAKEFILE" ] || { + echo "Cannot find: $MAKEFILE" + exit 1 +} + +[ -d "$CMAKE_DIR" ] || { + echo "Cannot find: $CMAKE_DIR" + exit 1 +} + +[ -f "$EXTRACT_INCLUDES_BAT" ] || { + echo "Cannot find: $EXTRACT_INCLUDES_BAT" + exit 1 +} + +# Extract file lists from src/Makefile.am +GZHEADERS=$(get_variable_value $MAKEFILE GZHEADERS) +HEADERS=$(get_variable_value $MAKEFILE nobase_include_HEADERS) +PUBLIC_HEADERS=$(sort_files $GZHEADERS $HEADERS) +LIBPROTOBUF_LITE_SOURCES=$(get_source_files $MAKEFILE libprotobuf_lite_la_SOURCES) +LIBPROTOBUF_SOURCES=$(get_source_files $MAKEFILE libprotobuf_la_SOURCES) +LIBPROTOC_SOURCES=$(get_source_files $MAKEFILE libprotoc_la_SOURCES) +LITE_PROTOS=$(get_proto_files $MAKEFILE protoc_lite_outputs) +PROTOS=$(get_proto_files $MAKEFILE protoc_outputs) +COMMON_TEST_SOURCES=$(get_source_files $MAKEFILE COMMON_TEST_SOURCES) +TEST_SOURCES=$(get_source_files $MAKEFILE protobuf_test_SOURCES) +LITE_TEST_SOURCES=$(get_source_files $MAKEFILE protobuf_lite_test_SOURCES) + +# Replace file lists in cmake files. +COMMON_PREFIX="\${protobuf_source_dir}/src/" +set_variable_value $CMAKE_DIR/libprotobuf-lite.cmake libprotobuf_lite_files $COMMON_PREFIX $LIBPROTOBUF_LITE_SOURCES +set_variable_value $CMAKE_DIR/libprotobuf.cmake libprotobuf_files $COMMON_PREFIX $LIBPROTOBUF_SOURCES +set_variable_value $CMAKE_DIR/libprotoc.cmake libprotoc_files $COMMON_PREFIX $LIBPROTOC_SOURCES +set_variable_value $CMAKE_DIR/tests.cmake lite_test_protos "" $LITE_PROTOS +set_variable_value $CMAKE_DIR/tests.cmake tests_protos "" $PROTOS +set_variable_value $CMAKE_DIR/tests.cmake common_test_files $COMMON_PREFIX $COMMON_TEST_SOURCES +set_variable_value $CMAKE_DIR/tests.cmake tests_files $COMMON_PREFIX $TEST_SOURCES +set_variable_value $CMAKE_DIR/tests.cmake lite_test_files $COMMON_PREFIX $LITE_TEST_SOURCES + +# Generate extract_includes.bat +for HEADER in $HEADERS; do + echo $(dirname $HEADER) | sed "s/\\//\\\\/g" +done | sort | uniq | sed "s/^/mkdir include\\\\/" > $EXTRACT_INCLUDES_BAT +for HEADER in $HEADERS; do + WINPATH=$(echo $HEADER | sed 's;/;\\\\;g') + echo "copy ..\\src\\$WINPATH include\\$WINPATH" >> $EXTRACT_INCLUDES_BAT +done diff --git a/configure.ac b/configure.ac index 8338c18d..8018cc75 100644 --- a/configure.ac +++ b/configure.ac @@ -12,7 +12,7 @@ AC_PREREQ(2.59) # In the SVN trunk, the version should always be the next anticipated release # version with the "-pre" suffix. (We used to use "-SNAPSHOT" but this pushed # the size of one file name in the dist tarfile over the 99-char limit.) -AC_INIT([Protocol Buffers],[3.0.0-alpha-3-pre],[protobuf@googlegroups.com],[protobuf]) +AC_INIT([Protocol Buffers],[3.0.0-alpha-4-pre],[protobuf@googlegroups.com],[protobuf]) AM_MAINTAINER_MODE([enable]) @@ -23,7 +23,7 @@ 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 | java | python | javanano | objectivec | ruby) ;; + all | cpp | csharp | java | python | javanano | objectivec | ruby) ;; *) AC_MSG_FAILURE([unknown language: $DIST_LANG]) ;; esac AC_SUBST(DIST_LANG) diff --git a/conformance/conformance_test_runner.cc b/conformance/conformance_test_runner.cc index ca5877bd..e0bb50a5 100644 --- a/conformance/conformance_test_runner.cc +++ b/conformance/conformance_test_runner.cc @@ -143,8 +143,9 @@ class ForkPipeRunner : public google::protobuf::ConformanceTestRunner { CHECK_SYSCALL(close(toproc_pipe_fd[1])); CHECK_SYSCALL(close(fromproc_pipe_fd[0])); - scoped_array<char> executable(new char[executable_.size()]); + scoped_array<char> executable(new char[executable_.size() + 1]); memcpy(executable.get(), executable_.c_str(), executable_.size()); + executable[executable_.size()] = '\0'; char *const argv[] = {executable.get(), NULL}; CHECK_SYSCALL(execv(executable.get(), argv)); // Never returns. diff --git a/java/pom.xml b/java/pom.xml index 112bd9c3..6877ac27 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -10,7 +10,7 @@ </parent> <groupId>com.google.protobuf</groupId> <artifactId>protobuf-java</artifactId> - <version>3.0.0-alpha-3-pre</version> + <version>3.0.0-alpha-4-pre</version> <packaging>bundle</packaging> <name>Protocol Buffer Java API</name> <description> @@ -164,7 +164,7 @@ <instructions> <Bundle-DocURL>https://developers.google.com/protocol-buffers/</Bundle-DocURL> <Bundle-SymbolicName>com.google.protobuf</Bundle-SymbolicName> - <Export-Package>com.google.protobuf;version=3.0.0-alpha-3-pre</Export-Package> + <Export-Package>com.google.protobuf;version=3.0.0-alpha-3</Export-Package> </instructions> </configuration> </plugin> @@ -191,6 +191,16 @@ <profiles> <profile> <id>release</id> + <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> <build> <plugins> <plugin> diff --git a/javanano/pom.xml b/javanano/pom.xml index 3d8cfb9f..f0bcc333 100644 --- a/javanano/pom.xml +++ b/javanano/pom.xml @@ -10,7 +10,7 @@ </parent> <groupId>com.google.protobuf.nano</groupId> <artifactId>protobuf-javanano</artifactId> - <version>3.0.0-alpha-3-pre</version> + <version>3.0.0-alpha-4-pre</version> <packaging>bundle</packaging> <name>Protocol Buffer JavaNano API</name> <description> @@ -165,7 +165,7 @@ <instructions> <Bundle-DocURL>https://developers.google.com/protocol-buffers/</Bundle-DocURL> <Bundle-SymbolicName>com.google.protobuf</Bundle-SymbolicName> - <Export-Package>com.google.protobuf;version=3.0.0-alpha-3-pre</Export-Package> + <Export-Package>com.google.protobuf;version=3.0.0-alpha-3</Export-Package> </instructions> </configuration> </plugin> @@ -174,6 +174,16 @@ <profiles> <profile> <id>release</id> + <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> <build> <plugins> <plugin> diff --git a/objectivec/Tests/GPBMessageTests+Serialization.m b/objectivec/Tests/GPBMessageTests+Serialization.m index 8867f56d..6d5527b5 100644 --- a/objectivec/Tests/GPBMessageTests+Serialization.m +++ b/objectivec/Tests/GPBMessageTests+Serialization.m @@ -146,9 +146,6 @@ static NSData *DataFromCStr(const char *str) { orig.repeatedEnumArray = [GPBEnumArray arrayWithValidationFunction:Message3_Enum_IsValidValue rawValue:Message3_Enum_Extra3]; - orig.repeatedPackedEnumArray = - [GPBEnumArray arrayWithValidationFunction:Message3_Enum_IsValidValue - rawValue:Message3_Enum_Extra3]; orig.oneofEnum = Message3_Enum_Extra3; Message2 *msg = [[Message2 alloc] initWithData:[orig data] error:NULL]; @@ -157,19 +154,16 @@ static NSData *DataFromCStr(const char *str) { XCTAssertFalse(msg.hasOptionalEnum); XCTAssertEqual(msg.repeatedEnumArray.count, 0U); - XCTAssertEqual(msg.repeatedPackedEnumArray.count, 0U); XCTAssertEqual(msg.oOneOfCase, Message3_O_OneOfCase_GPBUnsetOneOfCase); // All the values should be in unknown fields. GPBUnknownFieldSet *unknownFields = msg.unknownFields; - XCTAssertEqual([unknownFields countOfFields], 4U); + XCTAssertEqual([unknownFields countOfFields], 3U); XCTAssertTrue([unknownFields hasField:Message2_FieldNumber_OptionalEnum]); XCTAssertTrue( [unknownFields hasField:Message2_FieldNumber_RepeatedEnumArray]); - XCTAssertTrue( - [unknownFields hasField:Message2_FieldNumber_RepeatedPackedEnumArray]); XCTAssertTrue([unknownFields hasField:Message2_FieldNumber_OneofEnum]); GPBField *field = [unknownFields getField:Message2_FieldNumber_OptionalEnum]; @@ -177,15 +171,12 @@ static NSData *DataFromCStr(const char *str) { XCTAssertEqual([field.varintList valueAtIndex:0], (uint64_t)Message3_Enum_Extra3); + // Repeated in proto3 default to packed, so this will be length delimited + // unknown field, and the value (Message3_Enum_Extra3) encodes into one byte. field = [unknownFields getField:Message2_FieldNumber_RepeatedEnumArray]; - XCTAssertEqual(field.varintList.count, 1U); - XCTAssertEqual([field.varintList valueAtIndex:0], - (uint64_t)Message3_Enum_Extra3); - - field = [unknownFields getField:Message2_FieldNumber_RepeatedPackedEnumArray]; - XCTAssertEqual(field.varintList.count, 1U); - XCTAssertEqual([field.varintList valueAtIndex:0], - (uint64_t)Message3_Enum_Extra3); + XCTAssertEqual(field.lengthDelimitedList.count, 1U); + NSData *expected = DataFromCStr("\x1E"); + XCTAssertEqualObjects([field.lengthDelimitedList objectAtIndex:0], expected); field = [unknownFields getField:Message2_FieldNumber_OneofEnum]; XCTAssertEqual(field.varintList.count, 1U); diff --git a/objectivec/Tests/unittest_runtime_proto2.proto b/objectivec/Tests/unittest_runtime_proto2.proto index 12a2da68..ed835020 100644 --- a/objectivec/Tests/unittest_runtime_proto2.proto +++ b/objectivec/Tests/unittest_runtime_proto2.proto @@ -78,9 +78,8 @@ message Message2 { repeated group RepeatedGroup = 46 { optional int32 a = 47; } - repeated Message2 repeated_message = 48; - repeated Enum repeated_enum = 49; - repeated Enum repeated_packed_enum = 50 [packed=true]; + repeated Message2 repeated_message = 48; + repeated Enum repeated_enum = 49; oneof o { int32 oneof_int32 = 51 [default = 100]; diff --git a/objectivec/Tests/unittest_runtime_proto3.proto b/objectivec/Tests/unittest_runtime_proto3.proto index feb7029d..ad2e3620 100644 --- a/objectivec/Tests/unittest_runtime_proto3.proto +++ b/objectivec/Tests/unittest_runtime_proto3.proto @@ -76,7 +76,6 @@ message Message3 { // No 'group' in proto3. repeated Message3 repeated_message = 48; repeated Enum repeated_enum = 49; - repeated Enum repeated_packed_enum = 50 [packed=true]; oneof o { int32 oneof_int32 = 51; diff --git a/objectivec/google/protobuf/Descriptor.pbobjc.h b/objectivec/google/protobuf/Descriptor.pbobjc.h index 19a82fd1..5a53abbc 100644 --- a/objectivec/google/protobuf/Descriptor.pbobjc.h +++ b/objectivec/google/protobuf/Descriptor.pbobjc.h @@ -111,6 +111,23 @@ GPBEnumDescriptor *GPBFieldOptions_CType_EnumDescriptor(void); BOOL GPBFieldOptions_CType_IsValidValue(int32_t value); +#pragma mark - Enum GPBFieldOptions_JSType + +typedef GPB_ENUM(GPBFieldOptions_JSType) { + // Use the default type. + GPBFieldOptions_JSType_JsNormal = 0, + + // Use JavaScript strings. + GPBFieldOptions_JSType_JsString = 1, + + // Use JavaScript numbers. + GPBFieldOptions_JSType_JsNumber = 2, +}; + +GPBEnumDescriptor *GPBFieldOptions_JSType_EnumDescriptor(void); + +BOOL GPBFieldOptions_JSType_IsValidValue(int32_t value); + #pragma mark - GPBDescriptorRoot @@ -218,6 +235,8 @@ typedef GPB_ENUM(GPBDescriptorProto_FieldNumber) { GPBDescriptorProto_FieldNumber_ExtensionArray = 6, GPBDescriptorProto_FieldNumber_Options = 7, GPBDescriptorProto_FieldNumber_OneofDeclArray = 8, + GPBDescriptorProto_FieldNumber_ReservedRangeArray = 9, + GPBDescriptorProto_FieldNumber_ReservedNameArray = 10, }; // Describes a message type. @@ -247,6 +266,14 @@ typedef GPB_ENUM(GPBDescriptorProto_FieldNumber) { @property(nonatomic, readwrite) BOOL hasOptions; @property(nonatomic, readwrite, strong) GPBMessageOptions *options; +// |reservedRangeArray| contains |GPBDescriptorProto_ReservedRange| +@property(nonatomic, readwrite, strong) NSMutableArray *reservedRangeArray; + +// Reserved field names, which may not be used by fields in the same message. +// A given name may only be reserved once. +// |reservedNameArray| contains |NSString| +@property(nonatomic, readwrite, strong) NSMutableArray *reservedNameArray; + @end #pragma mark - GPBDescriptorProto_ExtensionRange @@ -266,6 +293,28 @@ typedef GPB_ENUM(GPBDescriptorProto_ExtensionRange_FieldNumber) { @end +#pragma mark - GPBDescriptorProto_ReservedRange + +typedef GPB_ENUM(GPBDescriptorProto_ReservedRange_FieldNumber) { + GPBDescriptorProto_ReservedRange_FieldNumber_Start = 1, + GPBDescriptorProto_ReservedRange_FieldNumber_End = 2, +}; + +// Range of reserved tag numbers. Reserved tag numbers may not be used by +// fields or extension ranges in the same message. Reserved ranges may +// not overlap. +@interface GPBDescriptorProto_ReservedRange : GPBMessage + +// Inclusive. +@property(nonatomic, readwrite) BOOL hasStart; +@property(nonatomic, readwrite) int32_t start; + +// Exclusive. +@property(nonatomic, readwrite) BOOL hasEnd; +@property(nonatomic, readwrite) int32_t end; + +@end + #pragma mark - GPBFieldDescriptorProto typedef GPB_ENUM(GPBFieldDescriptorProto_FieldNumber) { @@ -654,6 +703,7 @@ typedef GPB_ENUM(GPBFieldOptions_FieldNumber) { GPBFieldOptions_FieldNumber_Packed = 2, GPBFieldOptions_FieldNumber_Deprecated = 3, GPBFieldOptions_FieldNumber_Lazy = 5, + GPBFieldOptions_FieldNumber_Jstype = 6, GPBFieldOptions_FieldNumber_Weak = 10, GPBFieldOptions_FieldNumber_UninterpretedOptionArray = 999, }; @@ -670,10 +720,23 @@ typedef GPB_ENUM(GPBFieldOptions_FieldNumber) { // The packed option can be enabled for repeated primitive fields to enable // a more efficient representation on the wire. Rather than repeatedly // writing the tag and type for each element, the entire array is encoded as -// a single length-delimited blob. +// a single length-delimited blob. In proto3, only explicit setting it to +// false will avoid using packed encoding. @property(nonatomic, readwrite) BOOL hasPacked; @property(nonatomic, readwrite) BOOL packed; +// The jstype option determines the JavaScript type used for values of the +// field. The option is permitted only for 64 bit integral and fixed types +// (int64, uint64, sint64, fixed64, sfixed64). By default these types are +// represented as JavaScript strings. This avoids loss of precision that can +// happen when a large value is converted to a floating point JavaScript +// numbers. Specifying JS_NUMBER for the jstype causes the generated +// JavaScript code to use the JavaScript "number" type instead of strings. +// This option is an enum to permit additional types to be added, +// e.g. goog.math.Integer. +@property(nonatomic, readwrite) BOOL hasJstype; +@property(nonatomic, readwrite) GPBFieldOptions_JSType jstype; + // Should this field be parsed lazily? Lazy applies only to message-type // fields. It means that when the outer message is initially parsed, the // inner message's contents will not be parsed but instead stored in encoded diff --git a/objectivec/google/protobuf/Descriptor.pbobjc.m b/objectivec/google/protobuf/Descriptor.pbobjc.m index 2fc1953c..7f1bdd49 100644 --- a/objectivec/google/protobuf/Descriptor.pbobjc.m +++ b/objectivec/google/protobuf/Descriptor.pbobjc.m @@ -273,6 +273,8 @@ typedef struct GPBFileDescriptorProto_Storage { @dynamic extensionRangeArray; @dynamic oneofDeclArray; @dynamic hasOptions, options; +@dynamic reservedRangeArray; +@dynamic reservedNameArray; typedef struct GPBDescriptorProto_Storage { uint32_t _has_storage_[1]; @@ -284,6 +286,8 @@ typedef struct GPBDescriptorProto_Storage { NSMutableArray *extensionArray; GPBMessageOptions *options; NSMutableArray *oneofDeclArray; + NSMutableArray *reservedRangeArray; + NSMutableArray *reservedNameArray; } GPBDescriptorProto_Storage; // This method is threadsafe because it is initially called @@ -380,6 +384,28 @@ typedef struct GPBDescriptorProto_Storage { .typeSpecific.className = GPBStringifySymbol(GPBOneofDescriptorProto), .fieldOptions = NULL, }, + { + .name = "reservedRangeArray", + .number = GPBDescriptorProto_FieldNumber_ReservedRangeArray, + .hasIndex = GPBNoHasBit, + .flags = GPBFieldRepeated, + .type = GPBTypeMessage, + .offset = offsetof(GPBDescriptorProto_Storage, reservedRangeArray), + .defaultValue.valueMessage = nil, + .typeSpecific.className = GPBStringifySymbol(GPBDescriptorProto_ReservedRange), + .fieldOptions = NULL, + }, + { + .name = "reservedNameArray", + .number = GPBDescriptorProto_FieldNumber_ReservedNameArray, + .hasIndex = GPBNoHasBit, + .flags = GPBFieldRepeated, + .type = GPBTypeString, + .offset = offsetof(GPBDescriptorProto_Storage, reservedNameArray), + .defaultValue.valueMessage = nil, + .typeSpecific.className = NULL, + .fieldOptions = NULL, + }, }; descriptor = [GPBDescriptor allocDescriptorForClass:[GPBDescriptorProto class] rootClass:[GPBDescriptorRoot class] @@ -461,6 +487,67 @@ typedef struct GPBDescriptorProto_ExtensionRange_Storage { @end +#pragma mark - GPBDescriptorProto_ReservedRange + +@implementation GPBDescriptorProto_ReservedRange + +@dynamic hasStart, start; +@dynamic hasEnd, end; + +typedef struct GPBDescriptorProto_ReservedRange_Storage { + uint32_t _has_storage_[1]; + int32_t start; + int32_t end; +} GPBDescriptorProto_ReservedRange_Storage; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = NULL; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "start", + .number = GPBDescriptorProto_ReservedRange_FieldNumber_Start, + .hasIndex = 0, + .flags = GPBFieldOptional, + .type = GPBTypeInt32, + .offset = offsetof(GPBDescriptorProto_ReservedRange_Storage, start), + .defaultValue.valueInt32 = 0, + .typeSpecific.className = NULL, + .fieldOptions = NULL, + }, + { + .name = "end", + .number = GPBDescriptorProto_ReservedRange_FieldNumber_End, + .hasIndex = 1, + .flags = GPBFieldOptional, + .type = GPBTypeInt32, + .offset = offsetof(GPBDescriptorProto_ReservedRange_Storage, end), + .defaultValue.valueInt32 = 0, + .typeSpecific.className = NULL, + .fieldOptions = NULL, + }, + }; + descriptor = [GPBDescriptor allocDescriptorForClass:[GPBDescriptorProto_ReservedRange class] + rootClass:[GPBDescriptorRoot class] + file:GPBDescriptorRoot_FileDescriptor() + fields:fields + fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) + oneofs:NULL + oneofCount:0 + enums:NULL + enumCount:0 + ranges:NULL + rangeCount:0 + storageSize:sizeof(GPBDescriptorProto_ReservedRange_Storage) + wireFormat:NO]; + } + return descriptor; +} + +@end + #pragma mark - GPBFieldDescriptorProto @implementation GPBFieldDescriptorProto @@ -1462,6 +1549,7 @@ typedef struct GPBMessageOptions_Storage { @dynamic hasCtype, ctype; @dynamic hasPacked, packed; +@dynamic hasJstype, jstype; @dynamic hasLazy, lazy; @dynamic hasDeprecated, deprecated; @dynamic hasWeak, weak; @@ -1474,6 +1562,7 @@ typedef struct GPBFieldOptions_Storage { BOOL lazy; BOOL weak; GPBFieldOptions_CType ctype; + GPBFieldOptions_JSType jstype; NSMutableArray *uninterpretedOptionArray; } GPBFieldOptions_Storage; @@ -1508,7 +1597,7 @@ typedef struct GPBFieldOptions_Storage { { .name = "deprecated", .number = GPBFieldOptions_FieldNumber_Deprecated, - .hasIndex = 3, + .hasIndex = 4, .flags = GPBFieldOptional | GPBFieldHasDefaultValue, .type = GPBTypeBool, .offset = offsetof(GPBFieldOptions_Storage, deprecated), @@ -1519,7 +1608,7 @@ typedef struct GPBFieldOptions_Storage { { .name = "lazy", .number = GPBFieldOptions_FieldNumber_Lazy, - .hasIndex = 2, + .hasIndex = 3, .flags = GPBFieldOptional | GPBFieldHasDefaultValue, .type = GPBTypeBool, .offset = offsetof(GPBFieldOptions_Storage, lazy), @@ -1528,9 +1617,20 @@ typedef struct GPBFieldOptions_Storage { .fieldOptions = NULL, }, { + .name = "jstype", + .number = GPBFieldOptions_FieldNumber_Jstype, + .hasIndex = 2, + .flags = GPBFieldOptional | GPBFieldHasDefaultValue | GPBFieldHasEnumDescriptor, + .type = GPBTypeEnum, + .offset = offsetof(GPBFieldOptions_Storage, jstype), + .defaultValue.valueEnum = GPBFieldOptions_JSType_JsNormal, + .typeSpecific.enumDescFunc = GPBFieldOptions_JSType_EnumDescriptor, + .fieldOptions = NULL, + }, + { .name = "weak", .number = GPBFieldOptions_FieldNumber_Weak, - .hasIndex = 4, + .hasIndex = 5, .flags = GPBFieldOptional | GPBFieldHasDefaultValue, .type = GPBTypeBool, .offset = offsetof(GPBFieldOptions_Storage, weak), @@ -1552,6 +1652,7 @@ typedef struct GPBFieldOptions_Storage { }; static GPBMessageEnumDescription enums[] = { { .enumDescriptorFunc = GPBFieldOptions_CType_EnumDescriptor }, + { .enumDescriptorFunc = GPBFieldOptions_JSType_EnumDescriptor }, }; static GPBExtensionRange ranges[] = { { .start = 1000, .end = 536870912 }, @@ -1604,6 +1705,35 @@ BOOL GPBFieldOptions_CType_IsValidValue(int32_t value__) { } } +#pragma mark - Enum GPBFieldOptions_JSType + +GPBEnumDescriptor *GPBFieldOptions_JSType_EnumDescriptor(void) { + static GPBEnumDescriptor *descriptor = NULL; + if (!descriptor) { + static GPBMessageEnumValueDescription values[] = { + { .name = "JsNormal", .number = GPBFieldOptions_JSType_JsNormal }, + { .name = "JsString", .number = GPBFieldOptions_JSType_JsString }, + { .name = "JsNumber", .number = GPBFieldOptions_JSType_JsNumber }, + }; + descriptor = [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GPBFieldOptions_JSType) + values:values + valueCount:sizeof(values) / sizeof(GPBMessageEnumValueDescription) + enumVerifier:GPBFieldOptions_JSType_IsValidValue]; + } + return descriptor; +} + +BOOL GPBFieldOptions_JSType_IsValidValue(int32_t value__) { + switch (value__) { + case GPBFieldOptions_JSType_JsNormal: + case GPBFieldOptions_JSType_JsString: + case GPBFieldOptions_JSType_JsNumber: + return YES; + default: + return NO; + } +} + #pragma mark - GPBEnumOptions @implementation GPBEnumOptions diff --git a/post_process_dist.sh b/post_process_dist.sh index 3c01ed8f..05113af1 100755 --- a/post_process_dist.sh +++ b/post_process_dist.sh @@ -27,7 +27,7 @@ fi set -ex -LANGUAGES="cpp java javanano python ruby" +LANGUAGES="cpp csharp java javanano objectivec python ruby" BASENAME=`basename $1 .tar.gz` VERSION=${BASENAME:9} diff --git a/protoc-artifacts/pom.xml b/protoc-artifacts/pom.xml index fad81b57..52a7d2d6 100644 --- a/protoc-artifacts/pom.xml +++ b/protoc-artifacts/pom.xml @@ -10,7 +10,7 @@ </parent> <groupId>com.google.protobuf</groupId> <artifactId>protoc</artifactId> - <version>3.0.0-alpha-3-pre</version> + <version>3.0.0-alpha-4-pre</version> <packaging>pom</packaging> <name>Protobuf Compiler</name> <description> diff --git a/python/google/protobuf/__init__.py b/python/google/protobuf/__init__.py index 1345bd5f..3f67dfc7 100755 --- a/python/google/protobuf/__init__.py +++ b/python/google/protobuf/__init__.py @@ -32,4 +32,4 @@ # # Copyright 2007 Google Inc. All Rights Reserved. -__version__ = '3.0.0a3.dev0' +__version__ = '3.0.0a4.dev0' diff --git a/python/setup.py b/python/setup.py index 5c321f50..f53ad5ff 100755 --- a/python/setup.py +++ b/python/setup.py @@ -58,11 +58,14 @@ def GetVersion(): return __version__ -def generate_proto(source): +def generate_proto(source, require = True): """Invokes the Protocol Compiler to generate a _pb2.py from the given .proto file. Does nothing if the output already exists and is newer than the input.""" + if not require and not os.path.exists(source): + return + output = source.replace(".proto", "_pb2.py").replace("../src/", "") if (not os.path.exists(output) or @@ -87,30 +90,26 @@ def generate_proto(source): def GenerateUnittestProtos(): - # Unittest protos are only needed for development. - if not os.path.exists("../.git"): - return - - generate_proto("../src/google/protobuf/map_unittest.proto") - generate_proto("../src/google/protobuf/unittest.proto") - generate_proto("../src/google/protobuf/unittest_custom_options.proto") - generate_proto("../src/google/protobuf/unittest_import.proto") - generate_proto("../src/google/protobuf/unittest_import_public.proto") - generate_proto("../src/google/protobuf/unittest_mset.proto") - generate_proto("../src/google/protobuf/unittest_no_generic_services.proto") - generate_proto("../src/google/protobuf/unittest_proto3_arena.proto") - generate_proto("google/protobuf/internal/descriptor_pool_test1.proto") - generate_proto("google/protobuf/internal/descriptor_pool_test2.proto") - generate_proto("google/protobuf/internal/factory_test1.proto") - generate_proto("google/protobuf/internal/factory_test2.proto") - generate_proto("google/protobuf/internal/import_test_package/inner.proto") - generate_proto("google/protobuf/internal/import_test_package/outer.proto") - generate_proto("google/protobuf/internal/missing_enum_values.proto") - generate_proto("google/protobuf/internal/more_extensions.proto") - generate_proto("google/protobuf/internal/more_extensions_dynamic.proto") - generate_proto("google/protobuf/internal/more_messages.proto") - generate_proto("google/protobuf/internal/test_bad_identifiers.proto") - generate_proto("google/protobuf/pyext/python.proto") + generate_proto("../src/google/protobuf/map_unittest.proto", False) + generate_proto("../src/google/protobuf/unittest.proto", False) + generate_proto("../src/google/protobuf/unittest_custom_options.proto", False) + generate_proto("../src/google/protobuf/unittest_import.proto", False) + generate_proto("../src/google/protobuf/unittest_import_public.proto", False) + generate_proto("../src/google/protobuf/unittest_mset.proto", False) + generate_proto("../src/google/protobuf/unittest_no_generic_services.proto", False) + generate_proto("../src/google/protobuf/unittest_proto3_arena.proto", False) + generate_proto("google/protobuf/internal/descriptor_pool_test1.proto", False) + generate_proto("google/protobuf/internal/descriptor_pool_test2.proto", False) + generate_proto("google/protobuf/internal/factory_test1.proto", False) + generate_proto("google/protobuf/internal/factory_test2.proto", False) + generate_proto("google/protobuf/internal/import_test_package/inner.proto", False) + generate_proto("google/protobuf/internal/import_test_package/outer.proto", False) + generate_proto("google/protobuf/internal/missing_enum_values.proto", False) + generate_proto("google/protobuf/internal/more_extensions.proto", False) + generate_proto("google/protobuf/internal/more_extensions_dynamic.proto", False) + generate_proto("google/protobuf/internal/more_messages.proto", False) + generate_proto("google/protobuf/internal/test_bad_identifiers.proto", False) + generate_proto("google/protobuf/pyext/python.proto", False) class clean(_clean): diff --git a/ruby/Gemfile.lock b/ruby/Gemfile.lock index 6f349276..2cf5e472 100644 --- a/ruby/Gemfile.lock +++ b/ruby/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - google-protobuf (3.0.0.alpha.3.1.pre) + google-protobuf (3.0.0.alpha.3) GEM remote: https://rubygems.org/ diff --git a/ruby/google-protobuf.gemspec b/ruby/google-protobuf.gemspec index 28cdebf5..a9e570ec 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.0.0.alpha.3.1.pre" + s.version = "3.0.0.alpha.4.0.pre" s.licenses = ["BSD"] s.summary = "Protocol Buffers" s.description = "Protocol Buffers are Google's data interchange format." diff --git a/src/Makefile.am b/src/Makefile.am index 2ecf6028..33894dc1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -147,6 +147,7 @@ nobase_include_HEADERS = \ google/protobuf/compiler/java/java_names.h \ google/protobuf/compiler/javanano/javanano_generator.h \ google/protobuf/compiler/objectivec/objectivec_generator.h \ + google/protobuf/compiler/objectivec/objectivec_helpers.h \ google/protobuf/compiler/python/python_generator.h \ google/protobuf/compiler/ruby/ruby_generator.h \ google/protobuf/compiler/csharp/csharp_generator.h @@ -449,6 +450,8 @@ EXTRA_DIST = \ google/protobuf/testdata/text_format_unittest_extensions_data_pointy.txt \ google/protobuf/package_info.h \ google/protobuf/io/package_info.h \ + google/protobuf/compiler/ruby/ruby_generated_code.proto \ + google/protobuf/compiler/ruby/ruby_generated_code.rb \ google/protobuf/compiler/package_info.h \ google/protobuf/compiler/zip_output_unittest.sh \ google/protobuf/unittest_enormous_descriptor.proto diff --git a/src/google/protobuf/any.h b/src/google/protobuf/any.h index 757b45aa..f681eceb 100644 --- a/src/google/protobuf/any.h +++ b/src/google/protobuf/any.h @@ -43,7 +43,7 @@ namespace protobuf { namespace internal { // Helper class used to implement google::protobuf::Any. -class AnyMetadata { +class LIBPROTOBUF_EXPORT AnyMetadata { typedef ArenaStringPtr UrlType; typedef ArenaStringPtr ValueType; public: diff --git a/src/google/protobuf/arena.h b/src/google/protobuf/arena.h index 4adcd677..6c3f606e 100644 --- a/src/google/protobuf/arena.h +++ b/src/google/protobuf/arena.h @@ -413,12 +413,6 @@ class LIBPROTOBUF_EXPORT Arena { // trivially destructible. template <typename T> GOOGLE_ATTRIBUTE_ALWAYS_INLINE static T* CreateArray(::google::protobuf::Arena* arena, size_t num_elements) { -#if __cplusplus >= 201103L - static_assert(std::is_trivially_default_constructible<T>::value, - "CreateArray requires a trivially constructible type"); - static_assert(std::is_trivially_destructible<T>::value, - "CreateArray requires a trivially destructible type"); -#endif if (arena == NULL) { return static_cast<T*>(::operator new[](num_elements * sizeof(T))); } else { diff --git a/src/google/protobuf/arena_unittest.cc b/src/google/protobuf/arena_unittest.cc index 873e85ae..6c185695 100644 --- a/src/google/protobuf/arena_unittest.cc +++ b/src/google/protobuf/arena_unittest.cc @@ -30,8 +30,6 @@ #include <google/protobuf/arena.h> -#include <stdint.h> - #include <algorithm> #include <cstring> #include <memory> @@ -1232,8 +1230,11 @@ TEST(ArenaTest, ArenaHooksSanity) { EXPECT_EQ(1, ArenaHooksTestUtil::num_init); EXPECT_EQ(0, ArenaHooksTestUtil::num_allocations); ::google::protobuf::Arena::Create<uint64>(&arena); - EXPECT_EQ(1, ArenaHooksTestUtil::num_allocations); - + if (::google::protobuf::internal::has_trivial_destructor<uint64>::value) { + EXPECT_EQ(1, ArenaHooksTestUtil::num_allocations); + } else { + EXPECT_EQ(2, ArenaHooksTestUtil::num_allocations); + } arena.Reset(); arena.Reset(); EXPECT_EQ(2, ArenaHooksTestUtil::num_reset); diff --git a/src/google/protobuf/compiler/command_line_interface.cc b/src/google/protobuf/compiler/command_line_interface.cc index 667b2b63..c57cfd3d 100644 --- a/src/google/protobuf/compiler/command_line_interface.cc +++ b/src/google/protobuf/compiler/command_line_interface.cc @@ -53,6 +53,10 @@ #include <google/protobuf/stubs/shared_ptr.h> #endif +#ifdef __APPLE__ +#include <mach-o/dyld.h> +#endif + #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/stringprintf.h> #include <google/protobuf/compiler/importer.h> @@ -186,6 +190,16 @@ bool GetProtocAbsolutePath(string* path) { #ifdef _WIN32 char buffer[MAX_PATH]; int len = GetModuleFileName(NULL, buffer, MAX_PATH); +#elif __APPLE__ + char buffer[PATH_MAX]; + int len = 0; + + char dirtybuffer[PATH_MAX]; + uint32_t size = sizeof(dirtybuffer); + if (_NSGetExecutablePath(dirtybuffer, &size) == 0) { + realpath(dirtybuffer, buffer); + len = strlen(buffer); + } #else char buffer[PATH_MAX]; int len = readlink("/proc/self/exe", buffer, PATH_MAX); diff --git a/src/google/protobuf/compiler/command_line_interface_unittest.cc b/src/google/protobuf/compiler/command_line_interface_unittest.cc index 23d67e2b..e5b77c33 100644 --- a/src/google/protobuf/compiler/command_line_interface_unittest.cc +++ b/src/google/protobuf/compiler/command_line_interface_unittest.cc @@ -973,6 +973,9 @@ TEST_F(CommandLineInterfaceTest, WriteTransitiveDescriptorSetWithSourceInfo) { EXPECT_TRUE(descriptor_set.file(1).has_source_code_info()); } +#ifdef _WIN32 +// TODO(teboring): Figure out how to write test on windows. +#else TEST_F(CommandLineInterfaceTest, WriteDependencyManifestFileGivenTwoInputs) { CreateTempFile("foo.proto", "syntax = \"proto2\";\n" @@ -1042,6 +1045,7 @@ TEST_F(CommandLineInterfaceTest, WriteDependencyManifestFileForAbsolutePath) { "$tmpdir/bar.proto.MockCodeGenerator.test_generator: " "$tmpdir/foo.proto\\\n $tmpdir/bar.proto"); } +#endif // !_WIN32 // ------------------------------------------------------------------- diff --git a/src/google/protobuf/compiler/objectivec/objectivec_field.cc b/src/google/protobuf/compiler/objectivec/objectivec_field.cc index ee5253a5..c5f05653 100644 --- a/src/google/protobuf/compiler/objectivec/objectivec_field.cc +++ b/src/google/protobuf/compiler/objectivec/objectivec_field.cc @@ -256,7 +256,7 @@ void FieldGenerator::GenerateFieldDescription( // " .typeSpecific.value* = [something]," GenerateFieldDescriptionTypeSpecific(printer); - const string& field_options(variables_.at("fieldoptions")); + const string& field_options(variables_.find("fieldoptions")->second); if (field_options.empty()) { printer->Print(" .fieldOptions = NULL,\n"); } else { @@ -379,7 +379,7 @@ void ObjCObjFieldGenerator::GeneratePropertyDeclaration( printer->Print( variables_, "@property(nonatomic, readwrite, $property_storage_attribute$) $property_type$ *$name$$storage_attribute$;\n"); - if (IsInitName(variables_.at("name"))) { + if (IsInitName(variables_.find("name")->second)) { // If property name starts with init we need to annotate it to get past ARC. // http://stackoverflow.com/questions/18723226/how-do-i-annotate-an-objective-c-property-with-an-objc-method-family/18723227#18723227 printer->Print(variables_, @@ -426,7 +426,7 @@ void RepeatedFieldGenerator::GeneratePropertyDeclaration( "$comments$" "$array_comment$" "@property(nonatomic, readwrite, strong) $array_storage_type$ *$name$$storage_attribute$;\n"); - if (IsInitName(variables_.at("name"))) { + if (IsInitName(variables_.find("name")->second)) { // If property name starts with init we need to annotate it to get past ARC. // http://stackoverflow.com/questions/18723226/how-do-i-annotate-an-objective-c-property-with-an-objc-method-family/18723227#18723227 printer->Print(variables_, diff --git a/src/google/protobuf/compiler/objectivec/objectivec_helpers.h b/src/google/protobuf/compiler/objectivec/objectivec_helpers.h index 29168937..19317698 100644 --- a/src/google/protobuf/compiler/objectivec/objectivec_helpers.h +++ b/src/google/protobuf/compiler/objectivec/objectivec_helpers.h @@ -150,7 +150,7 @@ bool FilterClass(const string& name); // Generate decode data needed for ObjC's GPBDecodeTextFormatName() to transform // the input into the the expected output. -class TextFormatDecodeData { +class LIBPROTOC_EXPORT TextFormatDecodeData { public: TextFormatDecodeData() {} diff --git a/src/google/protobuf/compiler/objectivec/objectivec_helpers_unittest.cc b/src/google/protobuf/compiler/objectivec/objectivec_helpers_unittest.cc index 01e937c3..b091b77a 100644 --- a/src/google/protobuf/compiler/objectivec/objectivec_helpers_unittest.cc +++ b/src/google/protobuf/compiler/objectivec/objectivec_helpers_unittest.cc @@ -111,6 +111,8 @@ TEST(ObjCHelper, TextFormatDecodeData_DecodeDataForString_ByteCodes) { EXPECT_EQ(expected, result); } +// Death tests do not work on Windows as of yet. +#ifdef PROTOBUF_HAS_DEATH_TEST TEST(ObjCHelperDeathTest, TextFormatDecodeData_DecodeDataForString_Failures) { // Empty inputs. @@ -136,6 +138,7 @@ TEST(ObjCHelperDeathTest, TextFormatDecodeData_DecodeDataForString_Failures) { ::testing::KilledBySignal(SIGABRT), "error: got a null char in a string for making TextFormat data, input:"); } +#endif // PROTOBUF_HAS_DEATH_TEST TEST(ObjCHelper, TextFormatDecodeData_RawStrings) { TextFormatDecodeData decode_data; @@ -198,6 +201,9 @@ TEST(ObjCHelper, TextFormatDecodeData_ByteCodes) { EXPECT_EQ(expected, decode_data.Data()); } + +// Death tests do not work on Windows as of yet. +#ifdef PROTOBUF_HAS_DEATH_TEST TEST(ObjCHelperDeathTest, TextFormatDecodeData_Failures) { TextFormatDecodeData decode_data; @@ -234,6 +240,7 @@ TEST(ObjCHelperDeathTest, TextFormatDecodeData_Failures) { ::testing::KilledBySignal(SIGABRT), "error: duplicate key \\(2\\) making TextFormat data, input:"); } +#endif // PROTOBUF_HAS_DEATH_TEST } // namespace } // namespace objectivec diff --git a/src/google/protobuf/compiler/ruby/ruby_generated_code.proto b/src/google/protobuf/compiler/ruby/ruby_generated_code.proto new file mode 100644 index 00000000..42d82a6b --- /dev/null +++ b/src/google/protobuf/compiler/ruby/ruby_generated_code.proto @@ -0,0 +1,67 @@ +syntax = "proto3"; + +package A.B.C; + +message TestMessage { + int32 optional_int32 = 1; + int64 optional_int64 = 2; + uint32 optional_uint32 = 3; + uint64 optional_uint64 = 4; + bool optional_bool = 5; + double optional_double = 6; + float optional_float = 7; + string optional_string = 8; + bytes optional_bytes = 9; + TestEnum optional_enum = 10; + TestMessage optional_msg = 11; + + repeated int32 repeated_int32 = 21; + repeated int64 repeated_int64 = 22; + repeated uint32 repeated_uint32 = 23; + repeated uint64 repeated_uint64 = 24; + repeated bool repeated_bool = 25; + repeated double repeated_double = 26; + repeated float repeated_float = 27; + repeated string repeated_string = 28; + repeated bytes repeated_bytes = 29; + repeated TestEnum repeated_enum = 30; + repeated TestMessage repeated_msg = 31; + + oneof my_oneof { + int32 oneof_int32 = 41; + int64 oneof_int64 = 42; + uint32 oneof_uint32 = 43; + uint64 oneof_uint64 = 44; + bool oneof_bool = 45; + double oneof_double = 46; + float oneof_float = 47; + string oneof_string = 48; + bytes oneof_bytes = 49; + TestEnum oneof_enum = 50; + TestMessage oneof_msg = 51; + } + + map<int32, string> map_int32_string = 61; + map<int64, string> map_int64_string = 62; + map<uint32, string> map_uint32_string = 63; + map<uint64, string> map_uint64_string = 64; + map<bool, string> map_bool_string = 65; + map<string, string> map_string_string = 66; + map<string, TestMessage> map_string_msg = 67; + map<string, TestEnum> map_string_enum = 68; + map<string, int32> map_string_int32 = 69; + map<string, bool> map_string_bool = 70; + + message NestedMessage { + int32 foo = 1; + } + + NestedMessage nested_message = 80; +} + +enum TestEnum { + Default = 0; + A = 1; + B = 2; + C = 3; +} diff --git a/src/google/protobuf/compiler/ruby/ruby_generated_code.rb b/src/google/protobuf/compiler/ruby/ruby_generated_code.rb new file mode 100644 index 00000000..100d6fa7 --- /dev/null +++ b/src/google/protobuf/compiler/ruby/ruby_generated_code.rb @@ -0,0 +1,74 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: ruby_generated_code.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "A.B.C.TestMessage" do + optional :optional_int32, :int32, 1 + optional :optional_int64, :int64, 2 + optional :optional_uint32, :uint32, 3 + optional :optional_uint64, :uint64, 4 + optional :optional_bool, :bool, 5 + optional :optional_double, :double, 6 + optional :optional_float, :float, 7 + optional :optional_string, :string, 8 + optional :optional_bytes, :string, 9 + optional :optional_enum, :enum, 10, "A.B.C.TestEnum" + optional :optional_msg, :message, 11, "A.B.C.TestMessage" + repeated :repeated_int32, :int32, 21 + repeated :repeated_int64, :int64, 22 + repeated :repeated_uint32, :uint32, 23 + repeated :repeated_uint64, :uint64, 24 + repeated :repeated_bool, :bool, 25 + repeated :repeated_double, :double, 26 + repeated :repeated_float, :float, 27 + repeated :repeated_string, :string, 28 + repeated :repeated_bytes, :string, 29 + repeated :repeated_enum, :enum, 30, "A.B.C.TestEnum" + repeated :repeated_msg, :message, 31, "A.B.C.TestMessage" + map :map_int32_string, :int32, :string, 61 + map :map_int64_string, :int64, :string, 62 + map :map_uint32_string, :uint32, :string, 63 + map :map_uint64_string, :uint64, :string, 64 + map :map_bool_string, :bool, :string, 65 + map :map_string_string, :string, :string, 66 + map :map_string_msg, :string, :message, 67, "A.B.C.TestMessage" + map :map_string_enum, :string, :enum, 68, "A.B.C.TestEnum" + map :map_string_int32, :string, :int32, 69 + map :map_string_bool, :string, :bool, 70 + optional :nested_message, :message, 80, "A.B.C.TestMessage.NestedMessage" + oneof :my_oneof do + optional :oneof_int32, :int32, 41 + optional :oneof_int64, :int64, 42 + optional :oneof_uint32, :uint32, 43 + optional :oneof_uint64, :uint64, 44 + optional :oneof_bool, :bool, 45 + optional :oneof_double, :double, 46 + optional :oneof_float, :float, 47 + optional :oneof_string, :string, 48 + optional :oneof_bytes, :string, 49 + optional :oneof_enum, :enum, 50, "A.B.C.TestEnum" + optional :oneof_msg, :message, 51, "A.B.C.TestMessage" + end + end + add_message "A.B.C.TestMessage.NestedMessage" do + optional :foo, :int32, 1 + end + add_enum "A.B.C.TestEnum" do + value :Default, 0 + value :A, 1 + value :B, 2 + value :C, 3 + end +end + +module A + module B + module C + TestMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage").msgclass + TestMessage::NestedMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage.NestedMessage").msgclass + TestEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestEnum").enummodule + end + end +end diff --git a/src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc b/src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc index e35ca695..6c203ab6 100644 --- a/src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc +++ b/src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc @@ -45,10 +45,10 @@ namespace compiler { namespace ruby { namespace { -string FindRubyTestDir() { +string FindRubyTestDir(const string& file) { // Inspired by TestSourceDir() in src/google/protobuf/testing/googletest.cc. string prefix = "."; - while (!File::Exists(prefix + "/ruby/tests")) { + while (!File::Exists(prefix + "/src/google/protobuf/compiler/ruby" + file)) { if (!File::Exists(prefix)) { GOOGLE_LOG(FATAL) << "Could not find Ruby test directory. Please run tests from " @@ -56,7 +56,7 @@ string FindRubyTestDir() { } prefix += "/.."; } - return prefix + "/ruby/tests"; + return prefix + "/src/google/protobuf/compiler/ruby"; } // This test is a simple golden-file test over the output of the Ruby code @@ -67,7 +67,7 @@ string FindRubyTestDir() { // extensions to the point where we can do this test in a more automated way. TEST(RubyGeneratorTest, GeneratorTest) { - string ruby_tests = FindRubyTestDir(); + string ruby_tests = FindRubyTestDir("/ruby_generated_code.proto"); google::protobuf::compiler::CommandLineInterface cli; cli.SetInputsAreProtoPathRelative(true); @@ -78,11 +78,11 @@ TEST(RubyGeneratorTest, GeneratorTest) { // Copy generated_code.proto to the temporary test directory. string test_input; GOOGLE_CHECK_OK(File::GetContents( - ruby_tests + "/generated_code.proto", + ruby_tests + "/ruby_generated_code.proto", &test_input, true)); GOOGLE_CHECK_OK(File::SetContents( - TestTempDir() + "/generated_code.proto", + TestTempDir() + "/ruby_generated_code.proto", test_input, true)); @@ -93,7 +93,7 @@ TEST(RubyGeneratorTest, GeneratorTest) { "protoc", ruby_out.c_str(), proto_path.c_str(), - "generated_code.proto", + "ruby_generated_code.proto", }; EXPECT_EQ(0, cli.Run(4, argv)); @@ -101,12 +101,12 @@ TEST(RubyGeneratorTest, GeneratorTest) { // Load the generated output and compare to the expected result. string output; GOOGLE_CHECK_OK(File::GetContents( - TestTempDir() + "/generated_code.rb", + TestTempDir() + "/ruby_generated_code.rb", &output, true)); string expected_output; GOOGLE_CHECK_OK(File::GetContents( - ruby_tests + "/generated_code.rb", + ruby_tests + "/ruby_generated_code.rb", &expected_output, true)); EXPECT_EQ(expected_output, output); diff --git a/src/google/protobuf/lite_unittest.cc b/src/google/protobuf/lite_unittest.cc index 1995cf08..5af8b24d 100644 --- a/src/google/protobuf/lite_unittest.cc +++ b/src/google/protobuf/lite_unittest.cc @@ -700,7 +700,7 @@ int main(int argc, char* argv[]) { // Allocate a large initial block to avoid mallocs during hooked test. std::vector<char> arena_block(128 * 1024); google::protobuf::ArenaOptions options; - options.initial_block = arena_block.data(); + options.initial_block = &arena_block[0]; options.initial_block_size = arena_block.size(); google::protobuf::Arena arena(options); string data; diff --git a/src/google/protobuf/map.h b/src/google/protobuf/map.h index 1858e2f9..96d2f201 100644 --- a/src/google/protobuf/map.h +++ b/src/google/protobuf/map.h @@ -33,6 +33,7 @@ #include <iterator> #include <google/protobuf/stubs/hash.h> +#include <limits> // To support Visual Studio 2008 #include <google/protobuf/arena.h> #include <google/protobuf/generated_enum_util.h> @@ -167,11 +168,21 @@ class Map { } } - void construct(pointer p, const_reference t) { new (p) value_type(t); } +#if __cplusplus >= 201103L && !defined(GOOGLE_PROTOBUF_OS_APPLE) + template<class NodeType, class... Args> + void construct(NodeType* p, Args&&... args) { + new (p) NodeType(std::forward<Args>(args)...); + } - void destroy(pointer p) { - if (arena_ == NULL) p->~value_type(); + template<class NodeType> + void destroy(NodeType* p) { + p->~NodeType(); } +#else + void construct(pointer p, const_reference t) { new (p) value_type(t); } + + void destroy(pointer p) { p->~value_type(); } +#endif template <typename X> struct rebind { @@ -188,6 +199,11 @@ class Map { return arena_ != other.arena_; } + // To support Visual Studio 2008 + size_type max_size() const { + return std::numeric_limits<size_type>::max(); + } + private: Arena* arena_; @@ -199,7 +215,7 @@ class Map { typedef MapAllocator<std::pair<const Key, MapPair<Key, T>*> > Allocator; // Iterators - class LIBPROTOBUF_EXPORT const_iterator + class const_iterator : public std::iterator<std::forward_iterator_tag, value_type, ptrdiff_t, const value_type*, const value_type&> { typedef typename hash_map<Key, value_type*, hash<Key>, equal_to<Key>, @@ -229,7 +245,7 @@ class Map { InnerIt it_; }; - class LIBPROTOBUF_EXPORT iterator : public std::iterator<std::forward_iterator_tag, value_type> { + class iterator : public std::iterator<std::forward_iterator_tag, value_type> { typedef typename hash_map<Key, value_type*, hasher, equal_to<Key>, Allocator>::iterator InnerIt; @@ -428,7 +444,7 @@ class Map { internal::WireFormatLite::FieldType key_wire_type, internal::WireFormatLite::FieldType value_wire_type, int default_enum_value> - friend class LIBPROTOBUF_EXPORT internal::MapFieldLite; + friend class internal::MapFieldLite; }; } // namespace protobuf diff --git a/src/google/protobuf/map_entry.h b/src/google/protobuf/map_entry.h index f78a4f40..e93d0348 100644 --- a/src/google/protobuf/map_entry.h +++ b/src/google/protobuf/map_entry.h @@ -97,7 +97,7 @@ template <typename Key, typename Value, WireFormatLite::FieldType kKeyFieldType, WireFormatLite::FieldType kValueFieldType, int default_enum_value> -class LIBPROTOBUF_EXPORT MapEntry : public MapEntryBase { +class MapEntry : public MapEntryBase { // Handlers for key/value wire type. Provide utilities to parse/serialize // key/value. typedef MapWireFieldTypeHandler<kKeyFieldType> KeyWireHandler; @@ -274,8 +274,8 @@ class LIBPROTOBUF_EXPORT MapEntry : public MapEntryBase { typedef void DestructorSkippable_; template <typename K, typename V, WireFormatLite::FieldType k_wire_type, WireFormatLite::FieldType, int default_enum> - friend class LIBPROTOBUF_EXPORT internal::MapField; - friend class LIBPROTOBUF_EXPORT internal::GeneratedMessageReflection; + friend class internal::MapField; + friend class internal::GeneratedMessageReflection; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapEntry); }; diff --git a/src/google/protobuf/map_entry_lite.h b/src/google/protobuf/map_entry_lite.h index 2d11bea8..52746da5 100644 --- a/src/google/protobuf/map_entry_lite.h +++ b/src/google/protobuf/map_entry_lite.h @@ -60,7 +60,7 @@ template <typename Key, typename Value, WireFormatLite::FieldType kKeyFieldType, WireFormatLite::FieldType kValueFieldType, int default_enum_value> -class LIBPROTOBUF_EXPORT MapEntryLite : public MessageLite { +class MapEntryLite : public MessageLite { // Handlers for key/value wire type. Provide utilities to parse/serialize // key/value. typedef MapWireFieldTypeHandler<kKeyFieldType> KeyWireHandler; @@ -302,7 +302,7 @@ class LIBPROTOBUF_EXPORT MapEntryLite : public MessageLite { // only takes references of given key and value. template <typename K, typename V, WireFormatLite::FieldType k_wire_type, WireFormatLite::FieldType v_wire_type, int default_enum> - class LIBPROTOBUF_EXPORT MapEntryWrapper + class MapEntryWrapper : public MapEntryLite<K, V, k_wire_type, v_wire_type, default_enum> { typedef MapEntryLite<K, V, k_wire_type, v_wire_type, default_enum> Base; typedef typename Base::KeyCppType KeyCppType; @@ -336,7 +336,7 @@ class LIBPROTOBUF_EXPORT MapEntryLite : public MessageLite { // the temporary. template <typename K, typename V, WireFormatLite::FieldType k_wire_type, WireFormatLite::FieldType v_wire_type, int default_enum> - class LIBPROTOBUF_EXPORT MapEnumEntryWrapper + class MapEnumEntryWrapper : public MapEntryLite<K, V, k_wire_type, v_wire_type, default_enum> { typedef MapEntryLite<K, V, k_wire_type, v_wire_type, default_enum> Base; typedef typename Base::KeyCppType KeyCppType; @@ -357,7 +357,7 @@ class LIBPROTOBUF_EXPORT MapEntryLite : public MessageLite { const KeyCppType& key_; const ValCppType value_; - friend class LIBPROTOBUF_EXPORT google::protobuf::Arena; + friend class google::protobuf::Arena; typedef void DestructorSkippable_; }; @@ -396,10 +396,10 @@ class LIBPROTOBUF_EXPORT MapEntryLite : public MessageLite { typedef void DestructorSkippable_; template <typename K, typename V, WireFormatLite::FieldType, WireFormatLite::FieldType, int> - friend class LIBPROTOBUF_EXPORT internal::MapEntry; + friend class internal::MapEntry; template <typename K, typename V, WireFormatLite::FieldType, WireFormatLite::FieldType, int> - friend class LIBPROTOBUF_EXPORT internal::MapFieldLite; + friend class internal::MapFieldLite; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapEntryLite); }; diff --git a/src/google/protobuf/map_field.h b/src/google/protobuf/map_field.h index f3504f1b..56d3d0f4 100644 --- a/src/google/protobuf/map_field.h +++ b/src/google/protobuf/map_field.h @@ -68,7 +68,11 @@ class LIBPROTOBUF_EXPORT MapFieldBase { repeated_field_(NULL), entry_descriptor_(NULL), assign_descriptor_callback_(NULL), - state_(STATE_MODIFIED_MAP) {} + state_(STATE_MODIFIED_MAP) { + // Mutex's destructor needs to be called explicitly to release resources + // acquired in its constructor. + arena->OwnDestructor(&mutex_); + } virtual ~MapFieldBase(); // Returns reference to internal repeated field. Data written using @@ -146,7 +150,7 @@ template <typename Key, typename T, WireFormatLite::FieldType kKeyFieldType, WireFormatLite::FieldType kValueFieldType, int default_enum_value = 0> -class LIBPROTOBUF_EXPORT MapField : public MapFieldBase, +class MapField : public MapFieldBase, public MapFieldLite<Key, T, kKeyFieldType, kValueFieldType, default_enum_value> { // Handlers for key/value wire type. Provide utilities to parse/serialize diff --git a/src/google/protobuf/map_field_inl.h b/src/google/protobuf/map_field_inl.h index cbfc0c8f..5b4305f9 100644 --- a/src/google/protobuf/map_field_inl.h +++ b/src/google/protobuf/map_field_inl.h @@ -212,11 +212,11 @@ void MapField<Key, T, kKeyFieldType, kValueFieldType, default_enum_value>::SyncRepeatedFieldWithMapNoLock() const { if (repeated_field_ == NULL) { - if (arena_ == NULL) { + if (MapFieldBase::arena_ == NULL) { repeated_field_ = new RepeatedPtrField<Message>(); } else { - repeated_field_ = - Arena::CreateMessage<RepeatedPtrField<Message> >(arena_); + repeated_field_ = Arena::CreateMessage<RepeatedPtrField<Message> >( + MapFieldBase::arena_); } } const Map<Key, T>& map = GetInternalMap(); @@ -229,7 +229,8 @@ MapField<Key, T, kKeyFieldType, kValueFieldType, it != map.end(); ++it) { InitDefaultEntryOnce(); GOOGLE_CHECK(default_entry_ != NULL); - EntryType* new_entry = down_cast<EntryType*>(default_entry_->New(arena_)); + EntryType* new_entry = + down_cast<EntryType*>(default_entry_->New(MapFieldBase::arena_)); repeated_field->AddAllocated(new_entry); (*new_entry->mutable_key()) = it->first; (*new_entry->mutable_value()) = it->second; diff --git a/src/google/protobuf/map_field_lite.h b/src/google/protobuf/map_field_lite.h index 40322851..860dae55 100644 --- a/src/google/protobuf/map_field_lite.h +++ b/src/google/protobuf/map_field_lite.h @@ -45,7 +45,7 @@ template <typename Key, typename T, WireFormatLite::FieldType key_wire_type, WireFormatLite::FieldType value_wire_type, int default_enum_value = 0> -class LIBPROTOBUF_EXPORT MapFieldLite { +class MapFieldLite { // Define message type for internal repeated field. typedef MapEntryLite<Key, T, key_wire_type, value_wire_type, default_enum_value> EntryType; diff --git a/src/google/protobuf/map_field_test.cc b/src/google/protobuf/map_field_test.cc index f4681866..e3a64079 100644 --- a/src/google/protobuf/map_field_test.cc +++ b/src/google/protobuf/map_field_test.cc @@ -145,7 +145,7 @@ TEST_F(MapFieldBasePrimitiveTest, Arena) { // Allocate a large initial block to avoid mallocs during hooked test. std::vector<char> arena_block(128 * 1024); ArenaOptions options; - options.initial_block = arena_block.data(); + options.initial_block = &arena_block[0]; options.initial_block_size = arena_block.size(); Arena arena(options); diff --git a/src/google/protobuf/map_test.cc b/src/google/protobuf/map_test.cc index 447f52d9..d62ec85f 100644 --- a/src/google/protobuf/map_test.cc +++ b/src/google/protobuf/map_test.cc @@ -2285,7 +2285,7 @@ TEST(ArenaTest, ParsingAndSerializingNoHeapAllocation) { // Allocate a large initial block to avoid mallocs during hooked test. std::vector<char> arena_block(128 * 1024); ArenaOptions options; - options.initial_block = arena_block.data(); + options.initial_block = &arena_block[0]; options.initial_block_size = arena_block.size(); Arena arena(options); string data; diff --git a/src/google/protobuf/repeated_field.h b/src/google/protobuf/repeated_field.h index 5a2fb409..14f46298 100644 --- a/src/google/protobuf/repeated_field.h +++ b/src/google/protobuf/repeated_field.h @@ -1125,7 +1125,9 @@ template <typename Element> inline typename RepeatedField<Element>::iterator RepeatedField<Element>::erase( const_iterator first, const_iterator last) { size_type first_offset = first - cbegin(); - Truncate(std::copy(last, cend(), begin() + first_offset) - cbegin()); + if (first != last) { + Truncate(std::copy(last, cend(), begin() + first_offset) - cbegin()); + } return begin() + first_offset; } diff --git a/src/google/protobuf/stubs/hash.h b/src/google/protobuf/stubs/hash.h index 2d69fdc1..4da8a5d8 100755 --- a/src/google/protobuf/stubs/hash.h +++ b/src/google/protobuf/stubs/hash.h @@ -93,9 +93,12 @@ template <typename Key, typename Data, typename EqualKey = std::equal_to<Key>, typename Alloc = std::allocator< std::pair<const Key, Data> > > class hash_map : public std::map<Key, Data, HashFcn, EqualKey, Alloc> { + typedef std::map<Key, Data, HashFcn, EqualKey, Alloc> BaseClass; + public: - hash_map(int = 0, const HashFcn& = HashFcn(), const EqualKey& = EqualKey(), - const Alloc& = Alloc()) {} + hash_map(int a = 0, const HashFcn& b = HashFcn(), + const EqualKey& c = EqualKey(), + const Alloc& d = Alloc()) : BaseClass(a, b, c, d) {} }; template <typename Key, @@ -109,7 +112,7 @@ class hash_set : public std::set<Key, HashFcn> { #elif defined(_MSC_VER) && !defined(_STLPORT_VERSION) template <typename Key> -struct hash : public GOOGLE_PROTOBUF_HASH_NAMESPACE::hash_compare<Key> { +struct hash : public GOOGLE_PROTOBUF_HASH_COMPARE<Key> { }; // MSVC's hash_compare<const char*> hashes based on the string contents but @@ -123,8 +126,7 @@ class CstringLess { template <> struct hash<const char*> - : public GOOGLE_PROTOBUF_HASH_NAMESPACE::hash_compare< - const char*, CstringLess> {}; + : public GOOGLE_PROTOBUF_HASH_COMPARE<const char*, CstringLess> {}; template <typename Key, typename Data, typename HashFcn = hash<Key>, @@ -133,9 +135,13 @@ template <typename Key, typename Data, class hash_map : public GOOGLE_PROTOBUF_HASH_NAMESPACE::GOOGLE_PROTOBUF_HASH_MAP_CLASS< Key, Data, HashFcn, EqualKey, Alloc> { + typedef GOOGLE_PROTOBUF_HASH_NAMESPACE::GOOGLE_PROTOBUF_HASH_MAP_CLASS< + Key, Data, HashFcn, EqualKey, Alloc> BaseClass; + public: - hash_map(int = 0, const HashFcn& = HashFcn(), const EqualKey& = EqualKey(), - const Alloc& = Alloc()) {} + hash_map(int a = 0, const HashFcn& b = HashFcn(), + const EqualKey& c = EqualKey(), + const Alloc& d = Alloc()) : BaseClass(a, b, c, d) {} }; template <typename Key, typename HashFcn = hash<Key>, @@ -187,9 +193,13 @@ template <typename Key, typename Data, class hash_map : public GOOGLE_PROTOBUF_HASH_NAMESPACE::GOOGLE_PROTOBUF_HASH_MAP_CLASS< Key, Data, HashFcn, EqualKey, Alloc> { + typedef GOOGLE_PROTOBUF_HASH_NAMESPACE::GOOGLE_PROTOBUF_HASH_MAP_CLASS< + Key, Data, HashFcn, EqualKey, Alloc> BaseClass; + public: - hash_map(int = 0, const HashFcn& = HashFcn(), const EqualKey& = EqualKey(), - const Alloc& = Alloc()) {} + hash_map(int a = 0, const HashFcn& b = HashFcn(), + const EqualKey& c = EqualKey(), + const Alloc& d = Alloc()) : BaseClass(a, b, c, d) {} }; template <typename Key, typename HashFcn = hash<Key>, diff --git a/src/google/protobuf/stubs/strutil.h b/src/google/protobuf/stubs/strutil.h index 5faa81e0..397122ef 100644 --- a/src/google/protobuf/stubs/strutil.h +++ b/src/google/protobuf/stubs/strutil.h @@ -534,7 +534,7 @@ struct Hex { } }; -struct AlphaNum { +struct LIBPROTOBUF_EXPORT AlphaNum { const char *piece_data_; // move these to string_ref eventually size_t piece_size_; // move these to string_ref eventually @@ -610,23 +610,30 @@ using strings::AlphaNum; // be a reference into str. // ---------------------------------------------------------------------- -string StrCat(const AlphaNum &a, const AlphaNum &b); -string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c); -string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c, - const AlphaNum &d); -string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c, - const AlphaNum &d, const AlphaNum &e); -string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c, - const AlphaNum &d, const AlphaNum &e, const AlphaNum &f); -string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c, - const AlphaNum &d, const AlphaNum &e, const AlphaNum &f, - const AlphaNum &g); -string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c, - const AlphaNum &d, const AlphaNum &e, const AlphaNum &f, - const AlphaNum &g, const AlphaNum &h); -string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c, - const AlphaNum &d, const AlphaNum &e, const AlphaNum &f, - const AlphaNum &g, const AlphaNum &h, const AlphaNum &i); +LIBPROTOBUF_EXPORT string StrCat(const AlphaNum& a, const AlphaNum& b); +LIBPROTOBUF_EXPORT string StrCat(const AlphaNum& a, const AlphaNum& b, + const AlphaNum& c); +LIBPROTOBUF_EXPORT string StrCat(const AlphaNum& a, const AlphaNum& b, + const AlphaNum& c, const AlphaNum& d); +LIBPROTOBUF_EXPORT string StrCat(const AlphaNum& a, const AlphaNum& b, + const AlphaNum& c, const AlphaNum& d, + const AlphaNum& e); +LIBPROTOBUF_EXPORT string StrCat(const AlphaNum& a, const AlphaNum& b, + const AlphaNum& c, const AlphaNum& d, + const AlphaNum& e, const AlphaNum& f); +LIBPROTOBUF_EXPORT string StrCat(const AlphaNum& a, const AlphaNum& b, + const AlphaNum& c, const AlphaNum& d, + const AlphaNum& e, const AlphaNum& f, + const AlphaNum& g); +LIBPROTOBUF_EXPORT string StrCat(const AlphaNum& a, const AlphaNum& b, + const AlphaNum& c, const AlphaNum& d, + const AlphaNum& e, const AlphaNum& f, + const AlphaNum& g, const AlphaNum& h); +LIBPROTOBUF_EXPORT string StrCat(const AlphaNum& a, const AlphaNum& b, + const AlphaNum& c, const AlphaNum& d, + const AlphaNum& e, const AlphaNum& f, + const AlphaNum& g, const AlphaNum& h, + const AlphaNum& i); inline string StrCat(const AlphaNum& a) { return string(a.data(), a.size()); } @@ -651,12 +658,14 @@ inline string StrCat(const AlphaNum& a) { return string(a.data(), a.size()); } // worked around as consecutive calls to StrAppend are quite efficient. // ---------------------------------------------------------------------- -void StrAppend(string* dest, const AlphaNum& a); -void StrAppend(string* dest, const AlphaNum& a, const AlphaNum& b); -void StrAppend(string* dest, const AlphaNum& a, const AlphaNum& b, - const AlphaNum& c); -void StrAppend(string* dest, const AlphaNum& a, const AlphaNum& b, - const AlphaNum& c, const AlphaNum& d); +LIBPROTOBUF_EXPORT void StrAppend(string* dest, const AlphaNum& a); +LIBPROTOBUF_EXPORT void StrAppend(string* dest, const AlphaNum& a, + const AlphaNum& b); +LIBPROTOBUF_EXPORT void StrAppend(string* dest, const AlphaNum& a, + const AlphaNum& b, const AlphaNum& c); +LIBPROTOBUF_EXPORT void StrAppend(string* dest, const AlphaNum& a, + const AlphaNum& b, const AlphaNum& c, + const AlphaNum& d); // ---------------------------------------------------------------------- // Join() diff --git a/src/google/protobuf/testing/googletest.cc b/src/google/protobuf/testing/googletest.cc index 5f6a199a..b8bd790b 100644 --- a/src/google/protobuf/testing/googletest.cc +++ b/src/google/protobuf/testing/googletest.cc @@ -66,7 +66,14 @@ namespace protobuf { string TestSourceDir() { #ifndef GOOGLE_THIRD_PARTY_PROTOBUF -#ifdef _MSC_VER +#ifndef _MSC_VER + // automake sets the "srcdir" environment variable. + char* result = getenv("srcdir"); + if (result != NULL) { + return result; + } +#endif // _MSC_VER + // Look for the "src" directory. string prefix = "."; @@ -80,16 +87,6 @@ string TestSourceDir() { } return prefix + "/src"; #else - // automake sets the "srcdir" environment variable. - char* result = getenv("srcdir"); - if (result == NULL) { - // Otherwise, the test must be run from the source directory. - return "."; - } else { - return result; - } -#endif -#else return "third_party/protobuf/src"; #endif // GOOGLE_THIRD_PARTY_PROTOBUF } @@ -108,6 +105,10 @@ string GetTemporaryDirectoryName() { if (HasPrefixString(result, "\\")) { result.erase(0, 1); } + // The Win32 API accepts forward slashes as a path delimiter even though + // backslashes are standard. Let's avoid confusion and use only forward + // slashes. + result = StringReplace(result, "\\", "/", true); #endif // _WIN32 return result; } diff --git a/src/google/protobuf/wire_format_unittest.cc b/src/google/protobuf/wire_format_unittest.cc index e80c5a71..4b151f97 100644 --- a/src/google/protobuf/wire_format_unittest.cc +++ b/src/google/protobuf/wire_format_unittest.cc @@ -768,7 +768,7 @@ TEST(WireFormatTest, RepeatedScalarsDifferentTagSizes) { } TEST(WireFormatTest, CompatibleTypes) { - const int64 data = 0x100000000; + const int64 data = 0x100000000LL; unittest::Int64Message msg1; msg1.set_data(data); string serialized; diff --git a/vsprojects/extract_includes.bat b/vsprojects/extract_includes.bat index ddf7f33f..989fef4b 100755 --- a/vsprojects/extract_includes.bat +++ b/vsprojects/extract_includes.bat @@ -9,14 +9,21 @@ md include\google\protobuf\compiler\java md include\google\protobuf\compiler\javanano md include\google\protobuf\compiler\python md include\google\protobuf\compiler\ruby +copy ..\src\google\protobuf\any.pb.h include\google\protobuf\any.pb.h +copy ..\src\google\protobuf\api.pb.h include\google\protobuf\api.pb.h +copy ..\src\google\protobuf\any.h include\google\protobuf\any.h copy ..\src\google\protobuf\arena.h include\google\protobuf\arena.h copy ..\src\google\protobuf\arenastring.h include\google\protobuf\arenastring.h copy ..\src\google\protobuf\compiler\code_generator.h include\google\protobuf\compiler\code_generator.h copy ..\src\google\protobuf\compiler\command_line_interface.h include\google\protobuf\compiler\command_line_interface.h copy ..\src\google\protobuf\compiler\cpp\cpp_generator.h include\google\protobuf\compiler\cpp\cpp_generator.h +copy ..\src\google\protobuf\compiler\csharp\csharp_generator.h include\google\protobuf\compiler\csharp\csharp_generator.h copy ..\src\google\protobuf\compiler\importer.h include\google\protobuf\compiler\importer.h copy ..\src\google\protobuf\compiler\java\java_generator.h include\google\protobuf\compiler\java\java_generator.h +copy ..\src\google\protobuf\compiler\java\java_names.h include\google\protobuf\compiler\java\java_names.h copy ..\src\google\protobuf\compiler\javanano\javanano_generator.h include\google\protobuf\compiler\javanano\javanano_generator.h +copy ..\src\google\protobuf\compiler\objectivec\objectivec_generator.h include\google\protobuf\compiler\objectivec\objectivec_generator.h +copy ..\src\google\protobuf\compiler\objectivec\objectivec_helpers.h include\google\protobuf\compiler\objectivec\objectivec_helpers.h copy ..\src\google\protobuf\compiler\parser.h include\google\protobuf\compiler\parser.h copy ..\src\google\protobuf\compiler\plugin.h include\google\protobuf\compiler\plugin.h copy ..\src\google\protobuf\compiler\plugin.pb.h include\google\protobuf\compiler\plugin.pb.h @@ -26,7 +33,9 @@ copy ..\src\google\protobuf\descriptor_database.h include\google\protobuf\descri copy ..\src\google\protobuf\descriptor.h include\google\protobuf\descriptor.h copy ..\src\google\protobuf\descriptor.pb.h include\google\protobuf\descriptor.pb.h copy ..\src\google\protobuf\dynamic_message.h include\google\protobuf\dynamic_message.h +copy ..\src\google\protobuf\empty.pb.h include\google\protobuf\empty.pb.h copy ..\src\google\protobuf\extension_set.h include\google\protobuf\extension_set.h +copy ..\src\google\protobuf\field_mask.pb.h include\google\protobuf\field_mask.pb.h copy ..\src\google\protobuf\generated_enum_reflection.h include\google\protobuf\generated_enum_reflection.h copy ..\src\google\protobuf\generated_enum_util.h include\google\protobuf\generated_enum_util.h copy ..\src\google\protobuf\generated_message_reflection.h include\google\protobuf\generated_message_reflection.h @@ -42,8 +51,8 @@ copy ..\src\google\protobuf\io\zero_copy_stream_impl_lite.h include\google\proto copy ..\src\google\protobuf\map_entry.h include\google\protobuf\map_entry.h copy ..\src\google\protobuf\map_entry_lite.h include\google\protobuf\map_entry_lite.h copy ..\src\google\protobuf\map_field.h include\google\protobuf\map_field.h -copy ..\src\google\protobuf\map_field_lite.h include\google\protobuf\map_field_lite.h copy ..\src\google\protobuf\map_field_inl.h include\google\protobuf\map_field_inl.h +copy ..\src\google\protobuf\map_field_lite.h include\google\protobuf\map_field_lite.h copy ..\src\google\protobuf\map.h include\google\protobuf\map.h copy ..\src\google\protobuf\map_type_handler.h include\google\protobuf\map_type_handler.h copy ..\src\google\protobuf\message.h include\google\protobuf\message.h @@ -54,6 +63,8 @@ copy ..\src\google\protobuf\reflection_ops.h include\google\protobuf\reflection_ copy ..\src\google\protobuf\repeated_field.h include\google\protobuf\repeated_field.h copy ..\src\google\protobuf\repeated_field_reflection.h include\google\protobuf\repeated_field_reflection.h copy ..\src\google\protobuf\service.h include\google\protobuf\service.h +copy ..\src\google\protobuf\source_context.pb.h include\google\protobuf\source_context.pb.h +copy ..\src\google\protobuf\struct.pb.h include\google\protobuf\struct.pb.h copy ..\src\google\protobuf\stubs\atomicops.h include\google\protobuf\stubs\atomicops.h copy ..\src\google\protobuf\stubs\atomicops_internals_aix.h include\google\protobuf\stubs\atomicops_internals_aix.h copy ..\src\google\protobuf\stubs\atomicops_internals_arm64_gcc.h include\google\protobuf\stubs\atomicops_internals_arm64_gcc.h @@ -72,16 +83,20 @@ copy ..\src\google\protobuf\stubs\atomic_sequence_num.h include\google\protobuf\ copy ..\src\google\protobuf\stubs\casts.h include\google\protobuf\stubs\casts.h copy ..\src\google\protobuf\stubs\common.h include\google\protobuf\stubs\common.h copy ..\src\google\protobuf\stubs\fastmem.h include\google\protobuf\stubs\fastmem.h +copy ..\src\google\protobuf\stubs\hash.h include\google\protobuf\stubs\hash.h copy ..\src\google\protobuf\stubs\once.h include\google\protobuf\stubs\once.h copy ..\src\google\protobuf\stubs\platform_macros.h include\google\protobuf\stubs\platform_macros.h +copy ..\src\google\protobuf\stubs\shared_ptr.h include\google\protobuf\stubs\shared_ptr.h copy ..\src\google\protobuf\stubs\singleton.h include\google\protobuf\stubs\singleton.h -copy ..\src\google\protobuf\stubs\hash.h include\google\protobuf\stubs\hash.h copy ..\src\google\protobuf\stubs\stl_util.h include\google\protobuf\stubs\stl_util.h copy ..\src\google\protobuf\stubs\template_util.h include\google\protobuf\stubs\template_util.h copy ..\src\google\protobuf\stubs\type_traits.h include\google\protobuf\stubs\type_traits.h copy ..\src\google\protobuf\text_format.h include\google\protobuf\text_format.h +copy ..\src\google\protobuf\timestamp.pb.h include\google\protobuf\timestamp.pb.h +copy ..\src\google\protobuf\type.pb.h include\google\protobuf\type.pb.h copy ..\src\google\protobuf\unknown_field_set.h include\google\protobuf\unknown_field_set.h copy ..\src\google\protobuf\wire_format.h include\google\protobuf\wire_format.h copy ..\src\google\protobuf\wire_format_lite.h include\google\protobuf\wire_format_lite.h copy ..\src\google\protobuf\wire_format_lite_inl.h include\google\protobuf\wire_format_lite_inl.h +copy ..\src\google\protobuf\wrappers.pb.h include\google\protobuf\wrappers.pb.h copy google\protobuf\stubs\pbconfig.h include\google\protobuf\stubs\pbconfig.h diff --git a/vsprojects/google/protobuf/stubs/pbconfig.h b/vsprojects/google/protobuf/stubs/pbconfig.h index 18250a22..9629f2e4 100755 --- a/vsprojects/google/protobuf/stubs/pbconfig.h +++ b/vsprojects/google/protobuf/stubs/pbconfig.h @@ -10,24 +10,34 @@ // http://blogs.msdn.com/vcblog/archive/2009/05/25/stl-breaking-changes-in-visual-studio-2010-beta-1.aspx // And.. they are moved back to stdext in MSVC 2013 (haven't checked 2012). That // said, use unordered_map for MSVC 2010 and beyond is our safest bet. -#if _MSC_VER >= 1600 +#if _MSC_VER >= 1600 // Since Visual Studio 2010 #define GOOGLE_PROTOBUF_HASH_NAMESPACE std #define GOOGLE_PROTOBUF_HASH_MAP_H <unordered_map> #define GOOGLE_PROTOBUF_HASH_MAP_CLASS unordered_map #define GOOGLE_PROTOBUF_HASH_SET_H <unordered_set> #define GOOGLE_PROTOBUF_HASH_SET_CLASS unordered_set +#define GOOGLE_PROTOBUF_HASH_COMPARE std::hash_compare +#elif _MSC_VER >= 1500 // Since Visual Studio 2008 +#define GOOGLE_PROTOBUF_HASH_NAMESPACE std::tr1 +#define GOOGLE_PROTOBUF_HASH_MAP_H <unordered_map> +#define GOOGLE_PROTOBUF_HASH_MAP_CLASS unordered_map +#define GOOGLE_PROTOBUF_HASH_SET_H <unordered_set> +#define GOOGLE_PROTOBUF_HASH_SET_CLASS unordered_set +#define GOOGLE_PROTOBUF_HASH_COMPARE stdext::hash_compare #elif _MSC_VER >= 1310 #define GOOGLE_PROTOBUF_HASH_NAMESPACE stdext #define GOOGLE_PROTOBUF_HASH_MAP_H <hash_map> #define GOOGLE_PROTOBUF_HASH_MAP_CLASS hash_map #define GOOGLE_PROTOBUF_HASH_SET_H <hash_set> #define GOOGLE_PROTOBUF_HASH_SET_CLASS hash_set +#define GOOGLE_PROTOBUF_HASH_COMPARE stdext::hash_compare #else #define GOOGLE_PROTOBUF_HASH_NAMESPACE std #define GOOGLE_PROTOBUF_HASH_MAP_H <hash_map> #define GOOGLE_PROTOBUF_HASH_MAP_CLASS hash_map #define GOOGLE_PROTOBUF_HASH_SET_H <hash_set> #define GOOGLE_PROTOBUF_HASH_SET_CLASS hash_set +#define GOOGLE_PROTOBUF_HASH_COMPARE stdext::hash_compare #endif /* the location of <hash_set> */ diff --git a/vsprojects/libprotobuf-lite.vcproj b/vsprojects/libprotobuf-lite.vcproj index d245448d..be20dd0b 100644 --- a/vsprojects/libprotobuf-lite.vcproj +++ b/vsprojects/libprotobuf-lite.vcproj @@ -147,101 +147,28 @@ Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" > - <File - RelativePath="..\src\google\protobuf\io\coded_stream.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\coded_stream_inl.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\common.h" - > - </File> - <File - RelativePath=".\config.h" - > - </File> - <File - RelativePath=".\google\protobuf\stubs\pbconfig.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\extension_set.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\generated_message_util.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\hash.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\map-util.h" - > - </File> + <File RelativePath=".\config.h"></File> + <File RelativePath=".\google\protobuf\stubs\pbconfig.h"></File> + <File RelativePath="..\src\google\protobuf\extension_set.h"></File> + <File RelativePath="..\src\google\protobuf\generated_message_util.h"></File> <File RelativePath="..\src\google\protobuf\generated_enum_util.h"></File> + <File RelativePath="..\src\google\protobuf\io\coded_stream.h"></File> + <File RelativePath="..\src\google\protobuf\io\zero_copy_stream.h"></File> + <File RelativePath="..\src\google\protobuf\io\zero_copy_stream_impl_lite.h"></File> <File RelativePath="..\src\google\protobuf\map_entry_lite.h"></File> <File RelativePath="..\src\google\protobuf\map_field_lite.h"></File> - <File - RelativePath="..\src\google\protobuf\message_lite.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\once.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\atomicops.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\atomicops_internals_x86_msvc.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\platform_macros.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\repeated_field.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\stl_util.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\wire_format_lite.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\wire_format_lite_inl.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\zero_copy_stream.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\zero_copy_stream_impl_lite.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\stringprintf.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\template_util.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\type_traits.h" - > - </File> + <File RelativePath="..\src\google\protobuf\message_lite.h"></File> + <File RelativePath="..\src\google\protobuf\repeated_field.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\atomicops.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\atomicops_internals_x86_msvc.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\common.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\once.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\platform_macros.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\stl_util.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\template_util.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\type_traits.h"></File> + <File RelativePath="..\src\google\protobuf\wire_format_lite.h"></File> + <File RelativePath="..\src\google\protobuf\wire_format_lite_inl.h"></File> </Filter> <Filter Name="Resource Files" @@ -254,66 +181,26 @@ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > - <File - RelativePath="..\src\google\protobuf\stubs\atomicops_internals_x86_gcc.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\atomicops_internals_x86_msvc.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\common.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\once.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\stringprintf.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\arena.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\arenastring.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\extension_set.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\generated_message_util.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\message_lite.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\repeated_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\wire_format_lite.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\coded_stream.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\zero_copy_stream.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\zero_copy_stream_impl_lite.cc" - > - </File> + <File RelativePath="..\src\google\protobuf\arena.cc"></File> + <File RelativePath="..\src\google\protobuf\arenastring.cc"></File> + <File RelativePath="..\src\google\protobuf\extension_set.cc"></File> + <File RelativePath="..\src\google\protobuf\generated_message_util.cc"></File> + <File RelativePath="..\src\google\protobuf\io\coded_stream.cc"></File> + <File RelativePath="..\src\google\protobuf\io\coded_stream_inl.h"></File> + <File RelativePath="..\src\google\protobuf\io\zero_copy_stream.cc"></File> + <File RelativePath="..\src\google\protobuf\io\zero_copy_stream_impl_lite.cc"></File> + <File RelativePath="..\src\google\protobuf\message_lite.cc"></File> + <File RelativePath="..\src\google\protobuf\repeated_field.cc"></File> + <File RelativePath="..\src\google\protobuf\stubs\atomicops_internals_x86_gcc.cc"></File> + <File RelativePath="..\src\google\protobuf\stubs\atomicops_internals_x86_msvc.cc"></File> + <File RelativePath="..\src\google\protobuf\stubs\common.cc"></File> + <File RelativePath="..\src\google\protobuf\stubs\hash.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\map_util.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\once.cc"></File> + <File RelativePath="..\src\google\protobuf\stubs\shared_ptr.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\stringprintf.cc"></File> + <File RelativePath="..\src\google\protobuf\stubs\stringprintf.h"></File> + <File RelativePath="..\src\google\protobuf\wire_format_lite.cc"></File> </Filter> </Files> <Globals> diff --git a/vsprojects/libprotobuf.vcproj b/vsprojects/libprotobuf.vcproj index e782885f..0daec6d9 100644 --- a/vsprojects/libprotobuf.vcproj +++ b/vsprojects/libprotobuf.vcproj @@ -147,181 +147,49 @@ Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" > - <File - RelativePath="..\src\google\protobuf\io\coded_stream.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\coded_stream_inl.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\common.h" - > - </File> - <File - RelativePath=".\config.h" - > - </File> - <File - RelativePath=".\google\protobuf\stubs\pbconfig.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\descriptor.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\descriptor.pb.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\descriptor_database.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\dynamic_message.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\extension_set.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\generated_message_reflection.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\generated_message_util.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\gzip_stream.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\strtod.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\hash.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\importer.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\map_util.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\message.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\message_lite.h" - > - </File> + <File RelativePath=".\config.h"></File> + <File RelativePath=".\google\protobuf\stubs\pbconfig.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\importer.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\parser.h"></File> + <File RelativePath="..\src\google\protobuf\descriptor.h"></File> + <File RelativePath="..\src\google\protobuf\descriptor.pb.h"></File> + <File RelativePath="..\src\google\protobuf\descriptor_database.h"></File> + <File RelativePath="..\src\google\protobuf\dynamic_message.h"></File> + <File RelativePath="..\src\google\protobuf\extension_set.h"></File> <File RelativePath="..\src\google\protobuf\generated_enum_util.h"></File> + <File RelativePath="..\src\google\protobuf\generated_message_reflection.h"></File> + <File RelativePath="..\src\google\protobuf\generated_message_util.h"></File> + <File RelativePath="..\src\google\protobuf\io\coded_stream.h"></File> + <File RelativePath="..\src\google\protobuf\io\gzip_stream.h"></File> + <File RelativePath="..\src\google\protobuf\io\strtod.h"></File> + <File RelativePath="..\src\google\protobuf\io\printer.h"></File> + <File RelativePath="..\src\google\protobuf\io\tokenizer.h"></File> + <File RelativePath="..\src\google\protobuf\io\zero_copy_stream.h"></File> + <File RelativePath="..\src\google\protobuf\io\zero_copy_stream_impl.h"></File> + <File RelativePath="..\src\google\protobuf\io\zero_copy_stream_impl_lite.h"></File> <File RelativePath="..\src\google\protobuf\map_entry_lite.h"></File> <File RelativePath="..\src\google\protobuf\map_field_lite.h"></File> - <File - RelativePath="..\src\google\protobuf\stubs\atomicops.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\atomicops_internals_x86_msvc.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\platform_macros.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\once.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\parser.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\printer.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\reflection_ops.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\repeated_field.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\service.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\stl_util.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\stringprintf.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\template_util.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\type_traits.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\strutil.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\substitute.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\text_format.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\tokenizer.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\unknown_field_set.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\wire_format.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\wire_format_lite.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\wire_format_lite_inl.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\zero_copy_stream.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\zero_copy_stream_impl.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\zero_copy_stream_impl_lite.h" - > - </File> + <File RelativePath="..\src\google\protobuf\message.h"></File> + <File RelativePath="..\src\google\protobuf\message_lite.h"></File> + <File RelativePath="..\src\google\protobuf\reflection_ops.h"></File> + <File RelativePath="..\src\google\protobuf\repeated_field.h"></File> + <File RelativePath="..\src\google\protobuf\service.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\atomicops.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\atomicops_internals_x86_msvc.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\common.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\map_util.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\once.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\platform_macros.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\stl_util.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\strutil.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\substitute.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\template_util.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\type_traits.h"></File> + <File RelativePath="..\src\google\protobuf\text_format.h"></File> + <File RelativePath="..\src\google\protobuf\unknown_field_set.h"></File> + <File RelativePath="..\src\google\protobuf\wire_format.h"></File> + <File RelativePath="..\src\google\protobuf\wire_format_lite.h"></File> + <File RelativePath="..\src\google\protobuf\wire_format_lite_inl.h"></File> </Filter> <Filter Name="Resource Files" @@ -334,170 +202,63 @@ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > - <File - RelativePath="..\src\google\protobuf\stubs\atomicops_internals_x86_gcc.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\atomicops_internals_x86_msvc.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\common.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\once.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\stringprintf.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\arena.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\arenastring.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\extension_set.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\generated_message_util.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\map_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\message_lite.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\repeated_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\wire_format_lite.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\coded_stream.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\zero_copy_stream.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\zero_copy_stream_impl_lite.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\strutil.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\strutil.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\substitute.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\substitute.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\structurally_valid.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\descriptor.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\descriptor_database.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\descriptor.pb.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\dynamic_message.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\extension_set_heavy.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\generated_message_reflection.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\message.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\reflection_internal.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\reflection_ops.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\service.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\text_format.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\unknown_field_set.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\wire_format.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\gzip_stream.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\printer.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\strtod.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\tokenizer.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\zero_copy_stream_impl.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\importer.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\parser.cc" - > - </File> + <File RelativePath="..\src\google\protobuf\arena.cc"></File> + <File RelativePath="..\src\google\protobuf\arenastring.cc"></File> + <File RelativePath="..\src\google\protobuf\extension_set.cc"></File> + <File RelativePath="..\src\google\protobuf\generated_message_util.cc"></File> + <File RelativePath="..\src\google\protobuf\io\coded_stream.cc"></File> + <File RelativePath="..\src\google\protobuf\io\coded_stream_inl.h"></File> + <File RelativePath="..\src\google\protobuf\io\zero_copy_stream.cc"></File> + <File RelativePath="..\src\google\protobuf\io\zero_copy_stream_impl_lite.cc"></File> + <File RelativePath="..\src\google\protobuf\message_lite.cc"></File> + <File RelativePath="..\src\google\protobuf\repeated_field.cc"></File> + <File RelativePath="..\src\google\protobuf\stubs\atomicops_internals_x86_gcc.cc"></File> + <File RelativePath="..\src\google\protobuf\stubs\atomicops_internals_x86_msvc.cc"></File> + <File RelativePath="..\src\google\protobuf\stubs\common.cc"></File> + <File RelativePath="..\src\google\protobuf\stubs\hash.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\map_util.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\once.cc"></File> + <File RelativePath="..\src\google\protobuf\stubs\shared_ptr.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\stringprintf.cc"></File> + <File RelativePath="..\src\google\protobuf\stubs\stringprintf.h"></File> + <File RelativePath="..\src\google\protobuf\wire_format_lite.cc"></File> + <File RelativePath="..\src\google\protobuf\any.pb.cc"></File> + <File RelativePath="..\src\google\protobuf\any.cc"></File> + <File RelativePath="..\src\google\protobuf\api.pb.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\importer.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\parser.cc"></File> + <File RelativePath="..\src\google\protobuf\descriptor.cc"></File> + <File RelativePath="..\src\google\protobuf\descriptor_database.cc"></File> + <File RelativePath="..\src\google\protobuf\descriptor.pb.cc"></File> + <File RelativePath="..\src\google\protobuf\duration.pb.cc"></File> + <File RelativePath="..\src\google\protobuf\dynamic_message.cc"></File> + <File RelativePath="..\src\google\protobuf\empty.pb.cc"></File> + <File RelativePath="..\src\google\protobuf\extension_set_heavy.cc"></File> + <File RelativePath="..\src\google\protobuf\field_mask.pb.cc"></File> + <File RelativePath="..\src\google\protobuf\generated_message_reflection.cc"></File> + <File RelativePath="..\src\google\protobuf\io\gzip_stream.cc"></File> + <File RelativePath="..\src\google\protobuf\io\printer.cc"></File> + <File RelativePath="..\src\google\protobuf\io\strtod.cc"></File> + <File RelativePath="..\src\google\protobuf\io\tokenizer.cc"></File> + <File RelativePath="..\src\google\protobuf\io\zero_copy_stream_impl.cc"></File> + <File RelativePath="..\src\google\protobuf\map_field.cc"></File> + <File RelativePath="..\src\google\protobuf\message.cc"></File> + <File RelativePath="..\src\google\protobuf\reflection_internal.h"></File> + <File RelativePath="..\src\google\protobuf\reflection_ops.cc"></File> + <File RelativePath="..\src\google\protobuf\service.cc"></File> + <File RelativePath="..\src\google\protobuf\source_context.pb.cc"></File> + <File RelativePath="..\src\google\protobuf\struct.pb.cc"></File> + <File RelativePath="..\src\google\protobuf\stubs\structurally_valid.cc"></File> + <File RelativePath="..\src\google\protobuf\stubs\strutil.cc"></File> + <File RelativePath="..\src\google\protobuf\stubs\strutil.h"></File> + <File RelativePath="..\src\google\protobuf\stubs\substitute.cc"></File> + <File RelativePath="..\src\google\protobuf\stubs\substitute.h"></File> + <File RelativePath="..\src\google\protobuf\text_format.cc"></File> + <File RelativePath="..\src\google\protobuf\type.pb.cc"></File> + <File RelativePath="..\src\google\protobuf\timestamp.pb.cc"></File> + <File RelativePath="..\src\google\protobuf\unknown_field_set.cc"></File> + <File RelativePath="..\src\google\protobuf\wire_format.cc"></File> + <File RelativePath="..\src\google\protobuf\wrappers.pb.cc"></File> </Filter> </Files> <Globals> diff --git a/vsprojects/libprotoc.vcproj b/vsprojects/libprotoc.vcproj index 3474d21f..515a6096 100644 --- a/vsprojects/libprotoc.vcproj +++ b/vsprojects/libprotoc.vcproj @@ -147,250 +147,69 @@ Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" > - <File - RelativePath="..\src\google\protobuf\compiler\code_generator.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\command_line_interface.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\subprocess.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\zip_writer.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\plugin.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\plugin.pb.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_enum.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_enum_field.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_extension.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_field.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_file.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_generator.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_helpers.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_message.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_message_field.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_options.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_primitive_field.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_service.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_string_field.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_enum.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_enum_field.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_extension.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_field_base.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_generator.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_helpers.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_message.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_message_field.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_primitive_field.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_repeated_enum_field.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_repeated_message_field.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_repeated_primitive_field.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_source_generator_base.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_umbrella_class.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_writer.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_context.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_enum.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_enum_field.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_enum_field_lite.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_extension.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_field.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_file.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_generator.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_generator_factory.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_helpers.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_lazy_message_field.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_lazy_message_field_lite.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_message.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_message_lite.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_message_builder.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_message_builder_lite.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_message_field.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_message_field_lite.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_name_resolver.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_primitive_field.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_primitive_field_lite.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_service.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_shared_code_generator.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_string_field.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_string_field_lite.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_doc_comment.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_doc_comment.cc" - > - </File> + <File RelativePath="..\src\google\protobuf\compiler\code_generator.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\command_line_interface.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\subprocess.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\zip_writer.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\plugin.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\plugin.pb.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_enum.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_enum_field.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_extension.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_field.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_file.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_generator.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_helpers.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_map_field.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_message.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_message_field.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_options.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_primitive_field.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_service.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_string_field.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_enum.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_enum_field.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_extension.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_field_base.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_generator.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_helpers.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_message.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_message_field.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_primitive_field.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_repeated_enum_field.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_repeated_message_field.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_repeated_primitive_field.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_source_generator_base.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_umbrella_class.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_writer.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_context.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_enum.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_enum_field.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_enum_field_lite.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_extension.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_field.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_file.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_generator.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_generator_factory.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_helpers.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_lazy_message_field.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_lazy_message_field_lite.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_map_field.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_map_field_lite.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_message.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_message_lite.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_message_builder.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_message_builder_lite.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_message_field.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_message_field_lite.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_name_resolver.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_primitive_field.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_primitive_field_lite.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_service.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_shared_code_generator.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_string_field.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_string_field_lite.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_doc_comment.h"></File> <File RelativePath="..\src\google\protobuf\compiler\javanano\javanano_enum_field.h"></File> <File RelativePath="..\src\google\protobuf\compiler\javanano\javanano_enum.h"></File> <File RelativePath="..\src\google\protobuf\compiler\javanano\javanano_extension.h"></File> @@ -403,62 +222,20 @@ <File RelativePath="..\src\google\protobuf\compiler\javanano\javanano_message.h"></File> <File RelativePath="..\src\google\protobuf\compiler\javanano\javanano_params.h"></File> <File RelativePath="..\src\google\protobuf\compiler\javanano\javanano_primitive_field.h"></File> - <File - RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_enum.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_enum_field.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_extension.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_field.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_file.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_generator.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_helpers.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_map_field.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_message.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_message_field.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_oneof.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_primitive_field.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\python\python_generator.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\ruby\ruby_generator.h" - > - </File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_enum.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_enum_field.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_extension.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_field.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_file.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_generator.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_helpers.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_map_field.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_message.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_message_field.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_oneof.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_primitive_field.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\python\python_generator.h"></File> + <File RelativePath="..\src\google\protobuf\compiler\ruby\ruby_generator.h"></File> </Filter> <Filter Name="Resource Files" @@ -471,350 +248,93 @@ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > - <File - RelativePath="..\src\google\protobuf\compiler\code_generator.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\command_line_interface.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_enum.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_enum_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_extension.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_file.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_generator.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_helpers.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_map_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_message.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_message_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_primitive_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_service.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_string_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_enum.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_enum_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_extension.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_field_base.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_generator.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_helpers.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_message.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_message_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_primitive_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_repeated_enum_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_repeated_message_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_repeated_primitive_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_source_generator_base.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_umbrella_class.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_writer.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\ruby\ruby_generator.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_context.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_doc_comment.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_enum.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_enum_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_extension.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_file.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_generator.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_generator_factory.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_helpers.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_lazy_message_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_lazy_message_field_lite.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_map_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_map_field_lite.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_message.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_message_lite.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_message_builder.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_message_builder_lite.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_message_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_message_field_lite.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_name_resolver.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_primitive_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_primitive_field_lite.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_service.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_shared_code_generator.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_string_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_string_field_lite.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\javanano\javanano_enum.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\javanano\javanano_enum_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\javanano\javanano_extension.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\javanano\javanano_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\javanano\javanano_file.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\javanano\javanano_generator.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\javanano\javanano_helpers.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\javanano\javanano_map_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\javanano\javanano_message.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\javanano\javanano_message_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\javanano\javanano_primitive_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_enum.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_enum_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_extension.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_file.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_generator.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_helpers.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_map_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_message.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_message_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_oneof.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_primitive_field.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\plugin.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\plugin.pb.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\python\python_generator.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\subprocess.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\zip_writer.cc" - > - </File> + <File RelativePath="..\src\google\protobuf\compiler\code_generator.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\command_line_interface.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\plugin.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\plugin.pb.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\subprocess.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\zip_writer.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_enum.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_enum_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_extension.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_file.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_generator.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_helpers.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_map_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_message.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_message_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_primitive_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_service.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_string_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_enum.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_enum_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_extension.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_field_base.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_generator.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_helpers.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_message.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_message_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_primitive_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_repeated_enum_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_repeated_message_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_repeated_primitive_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_source_generator_base.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_umbrella_class.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_writer.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_context.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_doc_comment.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_enum.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_enum_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_enum_field_lite.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_extension.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_file.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_generator.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_generator_factory.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_helpers.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_lazy_message_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_lazy_message_field_lite.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_map_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_map_field_lite.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_message.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_message_lite.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_message_builder.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_message_builder_lite.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_message_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_message_field_lite.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_name_resolver.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_primitive_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_primitive_field_lite.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_service.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_shared_code_generator.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_string_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_string_field_lite.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\javanano\javanano_enum.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\javanano\javanano_enum_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\javanano\javanano_extension.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\javanano\javanano_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\javanano\javanano_file.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\javanano\javanano_generator.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\javanano\javanano_helpers.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\javanano\javanano_map_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\javanano\javanano_message.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\javanano\javanano_message_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\javanano\javanano_primitive_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_enum.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_enum_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_extension.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_file.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_generator.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_helpers.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_map_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_message.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_message_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_oneof.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_primitive_field.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\python\python_generator.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\ruby\ruby_generator.cc"></File> </Filter> </Files> <Globals> diff --git a/vsprojects/lite-test.vcproj b/vsprojects/lite-test.vcproj index 8d172248..aba212b1 100644 --- a/vsprojects/lite-test.vcproj +++ b/vsprojects/lite-test.vcproj @@ -178,24 +178,13 @@ Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" > - <File - RelativePath="..\src\google\protobuf\test_util_lite.h" - > - </File> <File RelativePath=".\google\protobuf\map_lite_unittest.pb.h"></File> + <File RelativePath=".\google\protobuf\unittest_import_lite.pb.h"></File> + <File RelativePath=".\google\protobuf\unittest_import_public_lite.pb.h"></File> + <File RelativePath=".\google\protobuf\unittest_lite.pb.h"></File> + <File RelativePath="..\src\google\protobuf\arena_test_util.h"></File> <File RelativePath="..\src\google\protobuf\map_lite_test_util.h"></File> - <File - RelativePath=".\google\protobuf\unittest_lite.pb.h" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_import_lite.pb.h" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_import_public_lite.pb.h" - > - </File> + <File RelativePath="..\src\google\protobuf\test_util_lite.h"></File> </Filter> <Filter Name="Resource Files" @@ -208,29 +197,39 @@ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > - <File - RelativePath="..\src\google\protobuf\lite_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\test_util_lite.cc" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_lite.pb.cc" - > - </File> <File RelativePath=".\google\protobuf\map_lite_unittest.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest_import_lite.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest_import_public_lite.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest_lite.pb.cc"></File> + <File RelativePath="..\src\google\protobuf\arena_test_util.cc"></File> + <File RelativePath="..\src\google\protobuf\lite_unittest.cc"></File> <File RelativePath="..\src\google\protobuf\map_lite_test_util.cc"></File> - <File - RelativePath=".\google\protobuf\unittest_import_lite.pb.cc" + <File RelativePath="..\src\google\protobuf\test_util_lite.cc"></File> + </Filter> + <File + RelativePath="..\src\google\protobuf\map_lite_unittest.proto" + > + <FileConfiguration + Name="Debug|Win32" > - </File> - <File - RelativePath=".\google\protobuf\unittest_import_public_lite.pb.cc" + <Tool + Name="VCCustomBuildTool" + Description="Generating map_lite_unittest.pb.{h,cc}..." + CommandLine="Debug\protoc -I../src --cpp_out=. ../src/google/protobuf/map_lite_unittest.proto
" + Outputs="google\protobuf\map_lite_unittest.pb.h;google\protobuf\map_lite_unittest.pb.cc" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" > - </File> - </Filter> + <Tool + Name="VCCustomBuildTool" + Description="Generating map_lite_unittest.pb.{h,cc}..." + CommandLine="Release\protoc -I../src --cpp_out=. ../src/google/protobuf/map_lite_unittest.proto
" + Outputs="google\protobuf\map_lite_unittest.pb.h;google\protobuf\map_lite_unittest.pb.cc" + /> + </FileConfiguration> + </File> <File RelativePath="..\src\google\protobuf\unittest_lite.proto" > diff --git a/vsprojects/tests.vcproj b/vsprojects/tests.vcproj index 90515ba5..792a3fd8 100644 --- a/vsprojects/tests.vcproj +++ b/vsprojects/tests.vcproj @@ -178,65 +178,23 @@ Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" > - <File - RelativePath=".\google\protobuf\compiler\cpp\cpp_test_bad_identifiers.pb.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\testing\file.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\testing\googletest.h" - > - </File> - <File - RelativePath="..\src\google\protobuf\test_util.h" - > - </File> + <File RelativePath=".\google\protobuf\compiler\cpp\cpp_test_bad_identifiers.pb.h"></File> + <File RelativePath=".\google\protobuf\unittest.pb.h"></File> + <File RelativePath=".\google\protobuf\unittest_custom_options.pb.h"></File> + <File RelativePath=".\google\protobuf\unittest_embed_optimize_for.pb.h"></File> + <File RelativePath=".\google\protobuf\unittest_import.pb.h"></File> + <File RelativePath=".\google\protobuf\unittest_import_public.pb.h"></File> + <File RelativePath=".\google\protobuf\unittest_lite_imports_nonline.pb.h"></File> + <File RelativePath=".\google\protobuf\unittest_mset.pb.h"></File> + <File RelativePath=".\google\protobuf\unittest_no_generic_services.pb.h"></File> + <File RelativePath=".\google\protobuf\unittest_optimize_for.pb.h"></File> + <File RelativePath="..\src\google\protobuf\testing\file.h"></File> + <File RelativePath="..\src\google\protobuf\testing\googletest.h"></File> + <File RelativePath="..\src\google\protobuf\test_util.h"></File> <File RelativePath="..\src\google\protobuf\map_test_util_impl.h"></File> <File RelativePath="..\src\google\protobuf\map_test_util.h"></File> <File RelativePath="..\src\google\protobuf\arena_test_util.h"></File> - <File - RelativePath="..\src\google\protobuf\compiler\mock_code_generator.h" - > - </File> - <File - RelativePath=".\google\protobuf\unittest.pb.h" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_custom_options.pb.h" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_embed_optimize_for.pb.h" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_import.pb.h" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_import_public.pb.h" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_lite_imports_nonline.pb.h" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_mset.pb.h" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_optimize_for.pb.h" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_no_generic_services.pb.h" - > - </File> + <File RelativePath="..\src\google\protobuf\compiler\mock_code_generator.h"></File> </Filter> <Filter Name="Resource Files" @@ -249,288 +207,109 @@ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > - <File - RelativePath="..\src\google\protobuf\arenastring_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\arena_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\command_line_interface_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_bootstrap_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_plugin_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\cpp\cpp_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\csharp\csharp_generator_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\importer_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_doc_comment_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\java\java_plugin_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\mock_code_generator.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\parser_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\compiler\python\python_plugin_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\descriptor_database_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\descriptor_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\drop_unknown_fields_test.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\dynamic_message_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\extension_set_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\generated_message_reflection_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\coded_stream_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\printer_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\tokenizer_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\io\zero_copy_stream_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\map_field_test.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\map_test.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\map_test_util.cc" - > - </File> + <File RelativePath=".\google\protobuf\map_lite_unittest.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest_import_lite.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest_lite.pb.cc"></File> + <File RelativePath=".\google\protobuf\compiler\cpp\cpp_test_bad_identifiers.pb.cc"></File> + <File RelativePath=".\google\protobuf\compiler\cpp\cpp_test_large_enum_value.pb.cc"></File> + <File RelativePath=".\google\protobuf\any_test.pb.cc"></File> + <File RelativePath=".\google\protobuf\map_proto2_unittest.pb.cc"></File> + <File RelativePath=".\google\protobuf\map_unittest.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest_arena.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest_custom_options.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest_drop_unknown_fields.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest_embed_optimize_for.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest_empty.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest_import.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest_import_public_lite.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest_import_public.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest_lite_imports_nonlite.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest_mset.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest_no_arena_import.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest_no_arena.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest_no_field_presence.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest_no_generic_services.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest_optimize_for.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest_preserve_unknown_enum2.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest_preserve_unknown_enum.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest_proto3_arena.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest_well_known_types.pb.cc"></File> + <File RelativePath=".\google\protobuf\unittest.pb.cc"></File> + <File RelativePath="..\src\google\protobuf\any_test.cc"></File> + <File RelativePath="..\src\google\protobuf\arenastring_unittest.cc"></File> <File RelativePath="..\src\google\protobuf\arena_test_util.cc"></File> - <File - RelativePath="..\src\google\protobuf\message_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\no_field_presence_test.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\preserve_unknown_enum_test.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\proto3_arena_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\reflection_ops_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\repeated_field_reflection_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\repeated_field_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\common_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\once_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\stringprintf_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\structurally_valid_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\strutil_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\template_util_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\stubs\type_traits_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\testing\file.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\testing\googletest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\test_util.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\text_format_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\unknown_field_set_unittest.cc" - > - </File> - <File - RelativePath="..\src\google\protobuf\wire_format_unittest.cc" - > - </File> - <File - RelativePath=".\google\protobuf\compiler\cpp\cpp_test_bad_identifiers.pb.cc" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_preserve_unknown_enum2.pb.cc" - > - </File> - <File - RelativePath=".\google\protobuf\map_proto2_unittest.pb.cc" - > - </File> - <File - RelativePath=".\google\protobuf\map_unittest.pb.cc" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_arena.pb.cc" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_custom_options.pb.cc" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_drop_unknown_fields.pb.cc" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_embed_optimize_for.pb.cc" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_empty.pb.cc" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_import_lite.pb.cc" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_import.pb.cc" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_import_public_lite.pb.cc" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_import_public.pb.cc" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_lite_imports_nonlite.pb.cc" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_lite.pb.cc" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_mset.pb.cc" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_no_arena_import.pb.cc" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_no_arena.pb.cc" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_no_field_presence.pb.cc" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_no_generic_services.pb.cc" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_optimize_for.pb.cc" - > - </File> - <File - RelativePath=".\google\protobuf\unittest.pb.cc" - > - </File> - <File - RelativePath=".\google\protobuf\unittest_preserve_unknown_enum.pb.cc" + <File RelativePath="..\src\google\protobuf\arena_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\command_line_interface_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_bootstrap_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_plugin_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\cpp\cpp_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\csharp\csharp_generator_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\importer_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_doc_comment_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\java\java_plugin_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\mock_code_generator.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\objectivec\objectivec_helpers_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\parser_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\compiler\python\python_plugin_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\descriptor_database_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\descriptor_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\drop_unknown_fields_test.cc"></File> + <File RelativePath="..\src\google\protobuf\dynamic_message_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\extension_set_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\generated_message_reflection_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\io\coded_stream_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\io\printer_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\io\tokenizer_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\io\zero_copy_stream_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\map_field_test.cc"></File> + <File RelativePath="..\src\google\protobuf\map_test.cc"></File> + <File RelativePath="..\src\google\protobuf\map_test_util.cc"></File> + <File RelativePath="..\src\google\protobuf\message_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\no_field_presence_test.cc"></File> + <File RelativePath="..\src\google\protobuf\preserve_unknown_enum_test.cc"></File> + <File RelativePath="..\src\google\protobuf\proto3_arena_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\reflection_ops_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\repeated_field_reflection_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\repeated_field_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\stubs\common_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\stubs\once_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\stubs\stringprintf_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\stubs\structurally_valid_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\stubs\strutil_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\stubs\template_util_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\stubs\type_traits_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\testing\file.cc"></File> + <File RelativePath="..\src\google\protobuf\testing\googletest.cc"></File> + <File RelativePath="..\src\google\protobuf\test_util.cc"></File> + <File RelativePath="..\src\google\protobuf\text_format_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\unknown_field_set_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\well_known_types_unittest.cc"></File> + <File RelativePath="..\src\google\protobuf\wire_format_unittest.cc"></File> + </Filter> + <File + RelativePath="..\src\google\protobuf\any_test.proto" + > + <FileConfiguration + Name="Debug|Win32" > - </File> - <File - RelativePath=".\google\protobuf\unittest_proto3_arena.pb.cc" + <Tool + Name="VCCustomBuildTool" + Description="Generating any_test.pb.{h,cc}..." + CommandLine="Debug\protoc -I../src --cpp_out=. ../src/google/protobuf/any_test.proto" + Outputs="google\protobuf\any_test.pb.h;google\protobuf\any_test.pb.cc" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" > - </File> - </Filter> + <Tool + Name="VCCustomBuildTool" + Description="Generating any_test.pb.{h,cc}..." + CommandLine="Release\protoc -I../src --cpp_out=. ../src/google/protobuf/any_test.proto" + Outputs="google\protobuf\any_test.pb.h;google\protobuf\any_test.pb.cc" + /> + </FileConfiguration> + </File> <File RelativePath="..\src\google\protobuf\unittest_preserve_unknown_enum2.proto" > @@ -556,6 +335,54 @@ </FileConfiguration> </File> <File + RelativePath="..\src\google\protobuf\unittest_well_known_types.proto" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCustomBuildTool" + Description="Generating unittest_well_known_types.pb.{h,cc}..." + CommandLine="Debug\protoc -I../src --cpp_out=. ../src/google/protobuf/unittest_well_known_types.proto" + Outputs="google\protobuf\unittest_well_known_types.pb.h;google\protobuf\unittest_well_known_types.pb.cc" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCustomBuildTool" + Description="Generating unittest_well_known_types.pb.{h,cc}..." + CommandLine="Release\protoc -I../src --cpp_out=. ../src/google/protobuf/unittest_well_known_types.proto" + Outputs="google\protobuf\unittest_well_known_types.pb.h;google\protobuf\unittest_well_known_types.pb.cc" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\src\google\protobuf\map_lite_unittest.proto" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCustomBuildTool" + Description="Generating map_lite_unittest.pb.{h,cc}..." + CommandLine="Debug\protoc -I../src --cpp_out=. ../src/google/protobuf/map_lite_unittest.proto" + Outputs="google\protobuf\map_lite_unittest.pb.h;google\protobuf\map_lite_unittest.pb.cc" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCustomBuildTool" + Description="Generating map_lite_unittest.pb.{h,cc}..." + CommandLine="Release\protoc -I../src --cpp_out=. ../src/google/protobuf/map_lite_unittest.proto" + Outputs="google\protobuf\map_lite_unittest.pb.h;google\protobuf\map_lite_unittest.pb.cc" + /> + </FileConfiguration> + </File> + <File RelativePath="..\src\google\protobuf\map_proto2_unittest.proto" > <FileConfiguration @@ -1107,6 +934,30 @@ /> </FileConfiguration> </File> + <File + RelativePath="..\src\google\protobuf\compiler\cpp\cpp_test_large_enum_value.proto" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCustomBuildTool" + Description="Generating cpp_test_large_enum_value.pb.{h,cc}..." + CommandLine="Debug\protoc -I../src --cpp_out=. ../src/google/protobuf/compiler/cpp/cpp_test_large_enum_value.proto" + Outputs="google\protobuf\compiler\cpp\cpp_test_large_enum_value.pb.h;google\protobuf\compiler\cpp\cpp_test_large_enum_value.pb.cc" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCustomBuildTool" + Description="Generating cpp_test_large_enum_value.pb.{h,cc}..." + CommandLine="Release\protoc -I../src --cpp_out=. ../src/google/protobuf/compiler/cpp/cpp_test_large_enum_value.proto" + Outputs="google\protobuf\compiler\cpp\cpp_test_large_enum_value.pb.h;google\protobuf\compiler\cpp\cpp_test_large_enum_value.pb.cc" + /> + </FileConfiguration> + </File> </Files> <Globals> </Globals> |