protoc 2.6.1.1 → 2.6.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (479) hide show
  1. checksums.yaml +4 -4
  2. data/ext/protoc/Makefile.in +10 -13
  3. data/ext/protoc/extconf.rb +0 -1
  4. data/ext/protoc/protobuf/CHANGES.txt +593 -0
  5. data/ext/protoc/protobuf/CONTRIBUTORS.txt +93 -0
  6. data/ext/protoc/protobuf/INSTALL.txt +237 -0
  7. data/ext/protoc/protobuf/LICENSE +33 -0
  8. data/ext/protoc/protobuf/Makefile.am +267 -0
  9. data/ext/protoc/protobuf/README.md +167 -0
  10. data/ext/protoc/protobuf/autogen.sh +41 -0
  11. data/ext/protoc/protobuf/benchmarks/ProtoBench.java +203 -0
  12. data/ext/protoc/protobuf/benchmarks/google_message1.dat +0 -0
  13. data/ext/protoc/protobuf/benchmarks/google_message2.dat +0 -0
  14. data/ext/protoc/protobuf/benchmarks/google_size.proto +136 -0
  15. data/ext/protoc/protobuf/benchmarks/google_speed.proto +136 -0
  16. data/ext/protoc/protobuf/benchmarks/readme.txt +50 -0
  17. data/ext/protoc/protobuf/configure.ac +159 -0
  18. data/ext/protoc/protobuf/editors/README.txt +5 -0
  19. data/ext/protoc/protobuf/editors/proto.vim +105 -0
  20. data/ext/protoc/protobuf/editors/protobuf-mode.el +220 -0
  21. data/ext/protoc/protobuf/examples/AddPerson.java +95 -0
  22. data/ext/protoc/protobuf/examples/ListPeople.java +50 -0
  23. data/ext/protoc/protobuf/examples/Makefile +58 -0
  24. data/ext/protoc/protobuf/examples/README.txt +29 -0
  25. data/ext/protoc/protobuf/examples/add_person.cc +95 -0
  26. data/ext/protoc/protobuf/examples/add_person.py +58 -0
  27. data/ext/protoc/protobuf/examples/addressbook.proto +30 -0
  28. data/ext/protoc/protobuf/examples/list_people.cc +68 -0
  29. data/ext/protoc/protobuf/examples/list_people.py +38 -0
  30. data/ext/protoc/protobuf/generate_descriptor_proto.sh +33 -0
  31. data/ext/protoc/protobuf/java/README.txt +96 -0
  32. data/ext/protoc/protobuf/java/pom.xml +217 -0
  33. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/AbstractMessage.java +466 -0
  34. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/AbstractMessageLite.java +355 -0
  35. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/AbstractParser.java +253 -0
  36. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/BlockingRpcChannel.java +51 -0
  37. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/BlockingService.java +64 -0
  38. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/BoundedByteString.java +163 -0
  39. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/ByteString.java +1022 -0
  40. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/CodedInputStream.java +1311 -0
  41. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/CodedOutputStream.java +1297 -0
  42. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/Descriptors.java +2238 -0
  43. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/DynamicMessage.java +622 -0
  44. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/Extension.java +96 -0
  45. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/ExtensionRegistry.java +392 -0
  46. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/ExtensionRegistryLite.java +185 -0
  47. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/FieldSet.java +907 -0
  48. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/GeneratedMessage.java +2213 -0
  49. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/GeneratedMessageLite.java +949 -0
  50. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/Internal.java +391 -0
  51. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java +122 -0
  52. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/LazyField.java +154 -0
  53. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/LazyFieldLite.java +176 -0
  54. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/LazyStringArrayList.java +367 -0
  55. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/LazyStringList.java +163 -0
  56. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/LiteralByteString.java +362 -0
  57. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/Message.java +244 -0
  58. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/MessageLite.java +320 -0
  59. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/MessageLiteOrBuilder.java +60 -0
  60. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/MessageOrBuilder.java +143 -0
  61. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/MessageReflection.java +931 -0
  62. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/Parser.java +261 -0
  63. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/ProtocolMessageEnum.java +58 -0
  64. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/ProtocolStringList.java +48 -0
  65. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/RepeatedFieldBuilder.java +696 -0
  66. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/RopeByteString.java +957 -0
  67. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/RpcCallback.java +47 -0
  68. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/RpcChannel.java +71 -0
  69. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/RpcController.java +118 -0
  70. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/RpcUtil.java +134 -0
  71. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/Service.java +117 -0
  72. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/ServiceException.java +52 -0
  73. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/SingleFieldBuilder.java +241 -0
  74. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/SmallSortedMap.java +618 -0
  75. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/TextFormat.java +1984 -0
  76. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/UninitializedMessageException.java +99 -0
  77. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/UnknownFieldSet.java +995 -0
  78. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/UnmodifiableLazyStringList.java +205 -0
  79. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/Utf8.java +349 -0
  80. data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/WireFormat.java +163 -0
  81. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/AbstractMessageTest.java +527 -0
  82. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/BoundedByteStringTest.java +68 -0
  83. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/ByteStringTest.java +759 -0
  84. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/CheckUtf8Test.java +141 -0
  85. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/CodedInputStreamTest.java +769 -0
  86. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/CodedOutputStreamTest.java +401 -0
  87. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/DeprecatedFieldTest.java +80 -0
  88. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/DescriptorsTest.java +735 -0
  89. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/DynamicMessageTest.java +326 -0
  90. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/ForceFieldBuildersPreRun.java +48 -0
  91. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/GeneratedMessageTest.java +1515 -0
  92. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/IsValidUtf8Test.java +180 -0
  93. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/IsValidUtf8TestUtil.java +421 -0
  94. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/LazyFieldLiteTest.java +134 -0
  95. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/LazyFieldTest.java +121 -0
  96. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/LazyMessageLiteTest.java +319 -0
  97. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/LazyStringArrayListTest.java +174 -0
  98. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/LazyStringEndToEndTest.java +143 -0
  99. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/LiteEqualsAndHashTest.java +85 -0
  100. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/LiteTest.java +148 -0
  101. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/LiteralByteStringTest.java +396 -0
  102. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/MessageTest.java +353 -0
  103. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/NestedBuildersTest.java +185 -0
  104. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/ParserTest.java +381 -0
  105. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/RepeatedFieldBuilderTest.java +190 -0
  106. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/RopeByteStringSubstringTest.java +97 -0
  107. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/RopeByteStringTest.java +115 -0
  108. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/ServiceTest.java +320 -0
  109. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/SingleFieldBuilderTest.java +155 -0
  110. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/SmallSortedMapTest.java +420 -0
  111. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/TestBadIdentifiers.java +96 -0
  112. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/TestUtil.java +4124 -0
  113. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/TextFormatTest.java +994 -0
  114. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/UnknownFieldSetTest.java +653 -0
  115. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/UnmodifiableLazyStringListTest.java +227 -0
  116. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/WireFormatTest.java +606 -0
  117. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/lazy_fields_lite.proto +61 -0
  118. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/lite_equals_and_hash.proto +55 -0
  119. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/multiple_files_test.proto +77 -0
  120. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/nested_builders_test.proto +53 -0
  121. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/nested_extension.proto +46 -0
  122. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/nested_extension_lite.proto +48 -0
  123. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/non_nested_extension.proto +49 -0
  124. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/non_nested_extension_lite.proto +50 -0
  125. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/outer_class_name_test.proto +38 -0
  126. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/outer_class_name_test2.proto +42 -0
  127. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/outer_class_name_test3.proto +43 -0
  128. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/test_bad_identifiers.proto +157 -0
  129. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/test_check_utf8.proto +50 -0
  130. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/test_check_utf8_size.proto +51 -0
  131. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/test_custom_options.proto +43 -0
  132. data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/test_extra_interfaces.proto +60 -0
  133. data/ext/protoc/protobuf/m4/ac_system_extensions.m4 +37 -0
  134. data/ext/protoc/protobuf/m4/acx_check_suncc.m4 +75 -0
  135. data/ext/protoc/protobuf/m4/acx_pthread.m4 +397 -0
  136. data/ext/protoc/protobuf/m4/stl_hash.m4 +72 -0
  137. data/ext/protoc/protobuf/more_tests/Makefile +41 -0
  138. data/ext/protoc/protobuf/post_process_dist.sh +60 -0
  139. data/ext/protoc/protobuf/protobuf-lite.pc.in +13 -0
  140. data/ext/protoc/protobuf/protobuf.pc.in +14 -0
  141. data/ext/protoc/protobuf/python/README.txt +105 -0
  142. data/ext/protoc/protobuf/python/ez_setup.py +284 -0
  143. data/ext/protoc/protobuf/python/google/__init__.py +1 -0
  144. data/ext/protoc/protobuf/python/google/protobuf/__init__.py +0 -0
  145. data/ext/protoc/protobuf/python/google/protobuf/descriptor.py +849 -0
  146. data/ext/protoc/protobuf/python/google/protobuf/descriptor_database.py +137 -0
  147. data/ext/protoc/protobuf/python/google/protobuf/descriptor_pool.py +643 -0
  148. data/ext/protoc/protobuf/python/google/protobuf/internal/__init__.py +0 -0
  149. data/ext/protoc/protobuf/python/google/protobuf/internal/api_implementation.cc +139 -0
  150. data/ext/protoc/protobuf/python/google/protobuf/internal/api_implementation.py +89 -0
  151. data/ext/protoc/protobuf/python/google/protobuf/internal/api_implementation_default_test.py +63 -0
  152. data/ext/protoc/protobuf/python/google/protobuf/internal/containers.py +269 -0
  153. data/ext/protoc/protobuf/python/google/protobuf/internal/cpp_message.py +663 -0
  154. data/ext/protoc/protobuf/python/google/protobuf/internal/decoder.py +831 -0
  155. data/ext/protoc/protobuf/python/google/protobuf/internal/descriptor_database_test.py +63 -0
  156. data/ext/protoc/protobuf/python/google/protobuf/internal/descriptor_pool_test.py +564 -0
  157. data/ext/protoc/protobuf/python/google/protobuf/internal/descriptor_pool_test1.proto +94 -0
  158. data/ext/protoc/protobuf/python/google/protobuf/internal/descriptor_pool_test2.proto +70 -0
  159. data/ext/protoc/protobuf/python/google/protobuf/internal/descriptor_python_test.py +54 -0
  160. data/ext/protoc/protobuf/python/google/protobuf/internal/descriptor_test.py +669 -0
  161. data/ext/protoc/protobuf/python/google/protobuf/internal/encoder.py +788 -0
  162. data/ext/protoc/protobuf/python/google/protobuf/internal/enum_type_wrapper.py +89 -0
  163. data/ext/protoc/protobuf/python/google/protobuf/internal/factory_test1.proto +57 -0
  164. data/ext/protoc/protobuf/python/google/protobuf/internal/factory_test2.proto +92 -0
  165. data/ext/protoc/protobuf/python/google/protobuf/internal/generator_test.py +343 -0
  166. data/ext/protoc/protobuf/python/google/protobuf/internal/message_factory_python_test.py +54 -0
  167. data/ext/protoc/protobuf/python/google/protobuf/internal/message_factory_test.py +131 -0
  168. data/ext/protoc/protobuf/python/google/protobuf/internal/message_listener.py +78 -0
  169. data/ext/protoc/protobuf/python/google/protobuf/internal/message_python_test.py +54 -0
  170. data/ext/protoc/protobuf/python/google/protobuf/internal/message_test.py +681 -0
  171. data/ext/protoc/protobuf/python/google/protobuf/internal/missing_enum_values.proto +50 -0
  172. data/ext/protoc/protobuf/python/google/protobuf/internal/more_extensions.proto +58 -0
  173. data/ext/protoc/protobuf/python/google/protobuf/internal/more_extensions_dynamic.proto +49 -0
  174. data/ext/protoc/protobuf/python/google/protobuf/internal/more_messages.proto +51 -0
  175. data/ext/protoc/protobuf/python/google/protobuf/internal/python_message.py +1251 -0
  176. data/ext/protoc/protobuf/python/google/protobuf/internal/reflection_test.py +2934 -0
  177. data/ext/protoc/protobuf/python/google/protobuf/internal/service_reflection_test.py +136 -0
  178. data/ext/protoc/protobuf/python/google/protobuf/internal/symbol_database_test.py +120 -0
  179. data/ext/protoc/protobuf/python/google/protobuf/internal/test_bad_identifiers.proto +52 -0
  180. data/ext/protoc/protobuf/python/google/protobuf/internal/test_util.py +662 -0
  181. data/ext/protoc/protobuf/python/google/protobuf/internal/text_encoding_test.py +68 -0
  182. data/ext/protoc/protobuf/python/google/protobuf/internal/text_format_test.py +743 -0
  183. data/ext/protoc/protobuf/python/google/protobuf/internal/type_checkers.py +328 -0
  184. data/ext/protoc/protobuf/python/google/protobuf/internal/unknown_fields_test.py +231 -0
  185. data/ext/protoc/protobuf/python/google/protobuf/internal/wire_format.py +268 -0
  186. data/ext/protoc/protobuf/python/google/protobuf/internal/wire_format_test.py +253 -0
  187. data/ext/protoc/protobuf/python/google/protobuf/message.py +284 -0
  188. data/ext/protoc/protobuf/python/google/protobuf/message_factory.py +155 -0
  189. data/ext/protoc/protobuf/python/google/protobuf/pyext/README +6 -0
  190. data/ext/protoc/protobuf/python/google/protobuf/pyext/__init__.py +0 -0
  191. data/ext/protoc/protobuf/python/google/protobuf/pyext/cpp_message.py +61 -0
  192. data/ext/protoc/protobuf/python/google/protobuf/pyext/descriptor.cc +357 -0
  193. data/ext/protoc/protobuf/python/google/protobuf/pyext/descriptor.h +96 -0
  194. data/ext/protoc/protobuf/python/google/protobuf/pyext/descriptor_cpp2_test.py +58 -0
  195. data/ext/protoc/protobuf/python/google/protobuf/pyext/extension_dict.cc +338 -0
  196. data/ext/protoc/protobuf/python/google/protobuf/pyext/extension_dict.h +123 -0
  197. data/ext/protoc/protobuf/python/google/protobuf/pyext/message.cc +2561 -0
  198. data/ext/protoc/protobuf/python/google/protobuf/pyext/message.h +305 -0
  199. data/ext/protoc/protobuf/python/google/protobuf/pyext/message_factory_cpp2_test.py +56 -0
  200. data/ext/protoc/protobuf/python/google/protobuf/pyext/proto2_api_test.proto +38 -0
  201. data/ext/protoc/protobuf/python/google/protobuf/pyext/python.proto +66 -0
  202. data/ext/protoc/protobuf/python/google/protobuf/pyext/python_protobuf.h +57 -0
  203. data/ext/protoc/protobuf/python/google/protobuf/pyext/reflection_cpp2_generated_test.py +94 -0
  204. data/ext/protoc/protobuf/python/google/protobuf/pyext/repeated_composite_container.cc +763 -0
  205. data/ext/protoc/protobuf/python/google/protobuf/pyext/repeated_composite_container.h +172 -0
  206. data/ext/protoc/protobuf/python/google/protobuf/pyext/repeated_scalar_container.cc +825 -0
  207. data/ext/protoc/protobuf/python/google/protobuf/pyext/repeated_scalar_container.h +112 -0
  208. data/ext/protoc/protobuf/python/google/protobuf/pyext/scoped_pyobject_ptr.h +95 -0
  209. data/ext/protoc/protobuf/python/google/protobuf/reflection.py +205 -0
  210. data/ext/protoc/protobuf/python/google/protobuf/service.py +226 -0
  211. data/ext/protoc/protobuf/python/google/protobuf/service_reflection.py +284 -0
  212. data/ext/protoc/protobuf/python/google/protobuf/symbol_database.py +185 -0
  213. data/ext/protoc/protobuf/python/google/protobuf/text_encoding.py +110 -0
  214. data/ext/protoc/protobuf/python/google/protobuf/text_format.py +873 -0
  215. data/ext/protoc/protobuf/python/mox.py +1401 -0
  216. data/ext/protoc/protobuf/python/setup.py +201 -0
  217. data/ext/protoc/protobuf/python/stubout.py +140 -0
  218. data/ext/protoc/protobuf/src/Makefile.am +418 -0
  219. data/ext/protoc/protobuf/src/google/protobuf/SEBS +240 -0
  220. data/ext/protoc/protobuf/src/google/protobuf/compiler/code_generator.cc +84 -0
  221. data/ext/protoc/protobuf/src/google/protobuf/compiler/code_generator.h +145 -0
  222. data/ext/protoc/protobuf/src/google/protobuf/compiler/command_line_interface.cc +1603 -0
  223. data/ext/protoc/protobuf/src/google/protobuf/compiler/command_line_interface.h +378 -0
  224. data/ext/protoc/protobuf/src/google/protobuf/compiler/command_line_interface_unittest.cc +1654 -0
  225. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc +158 -0
  226. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc +288 -0
  227. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h +103 -0
  228. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc +431 -0
  229. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.h +122 -0
  230. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc +210 -0
  231. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.h +86 -0
  232. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc +166 -0
  233. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_field.h +185 -0
  234. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc +665 -0
  235. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h +99 -0
  236. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc +125 -0
  237. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.h +72 -0
  238. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc +494 -0
  239. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h +206 -0
  240. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc +2645 -0
  241. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h +175 -0
  242. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc +375 -0
  243. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h +121 -0
  244. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_options.h +58 -0
  245. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc +123 -0
  246. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc +451 -0
  247. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.h +123 -0
  248. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_service.cc +334 -0
  249. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_service.h +118 -0
  250. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc +642 -0
  251. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.h +127 -0
  252. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto +132 -0
  253. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_unittest.cc +2074 -0
  254. data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_unittest.h +51 -0
  255. data/ext/protoc/protobuf/src/google/protobuf/compiler/importer.cc +480 -0
  256. data/ext/protoc/protobuf/src/google/protobuf/compiler/importer.h +317 -0
  257. data/ext/protoc/protobuf/src/google/protobuf/compiler/importer_unittest.cc +617 -0
  258. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_context.cc +195 -0
  259. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_context.h +95 -0
  260. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_doc_comment.cc +233 -0
  261. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_doc_comment.h +69 -0
  262. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_doc_comment_unittest.cc +67 -0
  263. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_enum.cc +333 -0
  264. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_enum.h +99 -0
  265. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_enum_field.cc +778 -0
  266. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_enum_field.h +158 -0
  267. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_extension.cc +207 -0
  268. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_extension.h +109 -0
  269. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_field.cc +213 -0
  270. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_field.h +162 -0
  271. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_file.cc +534 -0
  272. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_file.h +115 -0
  273. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_generator.cc +158 -0
  274. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_generator.h +72 -0
  275. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_generator_factory.cc +77 -0
  276. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_generator_factory.h +101 -0
  277. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_helpers.cc +737 -0
  278. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_helpers.h +322 -0
  279. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_lazy_message_field.cc +826 -0
  280. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_lazy_message_field.h +121 -0
  281. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_message.cc +1666 -0
  282. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_message.h +140 -0
  283. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_message_field.cc +1343 -0
  284. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_message_field.h +173 -0
  285. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_name_resolver.cc +266 -0
  286. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_name_resolver.h +124 -0
  287. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_plugin_unittest.cc +124 -0
  288. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_primitive_field.cc +877 -0
  289. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_primitive_field.h +160 -0
  290. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_service.cc +473 -0
  291. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_service.h +135 -0
  292. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_shared_code_generator.cc +201 -0
  293. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_shared_code_generator.h +90 -0
  294. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_string_field.cc +1056 -0
  295. data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_string_field.h +160 -0
  296. data/ext/protoc/protobuf/src/google/protobuf/compiler/main.cc +61 -0
  297. data/ext/protoc/protobuf/src/google/protobuf/compiler/mock_code_generator.cc +240 -0
  298. data/ext/protoc/protobuf/src/google/protobuf/compiler/mock_code_generator.h +117 -0
  299. data/ext/protoc/protobuf/src/google/protobuf/compiler/package_info.h +64 -0
  300. data/ext/protoc/protobuf/src/google/protobuf/compiler/parser.cc +1750 -0
  301. data/ext/protoc/protobuf/src/google/protobuf/compiler/parser.h +522 -0
  302. data/ext/protoc/protobuf/src/google/protobuf/compiler/parser_unittest.cc +2612 -0
  303. data/ext/protoc/protobuf/src/google/protobuf/compiler/plugin.cc +163 -0
  304. data/ext/protoc/protobuf/src/google/protobuf/compiler/plugin.h +72 -0
  305. data/ext/protoc/protobuf/src/google/protobuf/compiler/plugin.pb.cc +1148 -0
  306. data/ext/protoc/protobuf/src/google/protobuf/compiler/plugin.pb.h +897 -0
  307. data/ext/protoc/protobuf/src/google/protobuf/compiler/plugin.proto +147 -0
  308. data/ext/protoc/protobuf/src/google/protobuf/compiler/python/python_generator.cc +1262 -0
  309. data/ext/protoc/protobuf/src/google/protobuf/compiler/python/python_generator.h +166 -0
  310. data/ext/protoc/protobuf/src/google/protobuf/compiler/python/python_plugin_unittest.cc +118 -0
  311. data/ext/protoc/protobuf/src/google/protobuf/compiler/subprocess.cc +463 -0
  312. data/ext/protoc/protobuf/src/google/protobuf/compiler/subprocess.h +108 -0
  313. data/ext/protoc/protobuf/src/google/protobuf/compiler/test_plugin.cc +51 -0
  314. data/ext/protoc/protobuf/src/google/protobuf/compiler/zip_output_unittest.sh +91 -0
  315. data/ext/protoc/protobuf/src/google/protobuf/compiler/zip_writer.cc +218 -0
  316. data/ext/protoc/protobuf/src/google/protobuf/compiler/zip_writer.h +93 -0
  317. data/ext/protoc/protobuf/src/google/protobuf/descriptor.cc +5420 -0
  318. data/ext/protoc/protobuf/src/google/protobuf/descriptor.h +1691 -0
  319. data/ext/protoc/protobuf/src/google/protobuf/descriptor.pb.cc +9135 -0
  320. data/ext/protoc/protobuf/src/google/protobuf/descriptor.pb.h +6761 -0
  321. data/ext/protoc/protobuf/src/google/protobuf/descriptor.proto +687 -0
  322. data/ext/protoc/protobuf/src/google/protobuf/descriptor_database.cc +543 -0
  323. data/ext/protoc/protobuf/src/google/protobuf/descriptor_database.h +369 -0
  324. data/ext/protoc/protobuf/src/google/protobuf/descriptor_database_unittest.cc +748 -0
  325. data/ext/protoc/protobuf/src/google/protobuf/descriptor_pb2_test.py +54 -0
  326. data/ext/protoc/protobuf/src/google/protobuf/descriptor_unittest.cc +5501 -0
  327. data/ext/protoc/protobuf/src/google/protobuf/dynamic_message.cc +764 -0
  328. data/ext/protoc/protobuf/src/google/protobuf/dynamic_message.h +148 -0
  329. data/ext/protoc/protobuf/src/google/protobuf/dynamic_message_unittest.cc +230 -0
  330. data/ext/protoc/protobuf/src/google/protobuf/extension_set.cc +1663 -0
  331. data/ext/protoc/protobuf/src/google/protobuf/extension_set.h +1234 -0
  332. data/ext/protoc/protobuf/src/google/protobuf/extension_set_heavy.cc +734 -0
  333. data/ext/protoc/protobuf/src/google/protobuf/extension_set_unittest.cc +1095 -0
  334. data/ext/protoc/protobuf/src/google/protobuf/generated_enum_reflection.h +91 -0
  335. data/ext/protoc/protobuf/src/google/protobuf/generated_message_reflection.cc +1683 -0
  336. data/ext/protoc/protobuf/src/google/protobuf/generated_message_reflection.h +504 -0
  337. data/ext/protoc/protobuf/src/google/protobuf/generated_message_reflection_unittest.cc +795 -0
  338. data/ext/protoc/protobuf/src/google/protobuf/generated_message_util.cc +65 -0
  339. data/ext/protoc/protobuf/src/google/protobuf/generated_message_util.h +113 -0
  340. data/ext/protoc/protobuf/src/google/protobuf/io/coded_stream.cc +914 -0
  341. data/ext/protoc/protobuf/src/google/protobuf/io/coded_stream.h +1220 -0
  342. data/ext/protoc/protobuf/src/google/protobuf/io/coded_stream_inl.h +69 -0
  343. data/ext/protoc/protobuf/src/google/protobuf/io/coded_stream_unittest.cc +1378 -0
  344. data/ext/protoc/protobuf/src/google/protobuf/io/gzip_stream.cc +326 -0
  345. data/ext/protoc/protobuf/src/google/protobuf/io/gzip_stream.h +209 -0
  346. data/ext/protoc/protobuf/src/google/protobuf/io/gzip_stream_unittest.sh +44 -0
  347. data/ext/protoc/protobuf/src/google/protobuf/io/package_info.h +54 -0
  348. data/ext/protoc/protobuf/src/google/protobuf/io/printer.cc +198 -0
  349. data/ext/protoc/protobuf/src/google/protobuf/io/printer.h +136 -0
  350. data/ext/protoc/protobuf/src/google/protobuf/io/printer_unittest.cc +285 -0
  351. data/ext/protoc/protobuf/src/google/protobuf/io/strtod.cc +113 -0
  352. data/ext/protoc/protobuf/src/google/protobuf/io/strtod.h +50 -0
  353. data/ext/protoc/protobuf/src/google/protobuf/io/tokenizer.cc +1127 -0
  354. data/ext/protoc/protobuf/src/google/protobuf/io/tokenizer.h +402 -0
  355. data/ext/protoc/protobuf/src/google/protobuf/io/tokenizer_unittest.cc +999 -0
  356. data/ext/protoc/protobuf/src/google/protobuf/io/zero_copy_stream.cc +57 -0
  357. data/ext/protoc/protobuf/src/google/protobuf/io/zero_copy_stream.h +248 -0
  358. data/ext/protoc/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc +473 -0
  359. data/ext/protoc/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h +358 -0
  360. data/ext/protoc/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc +405 -0
  361. data/ext/protoc/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h +354 -0
  362. data/ext/protoc/protobuf/src/google/protobuf/io/zero_copy_stream_unittest.cc +965 -0
  363. data/ext/protoc/protobuf/src/google/protobuf/lite_unittest.cc +350 -0
  364. data/ext/protoc/protobuf/src/google/protobuf/message.cc +358 -0
  365. data/ext/protoc/protobuf/src/google/protobuf/message.h +866 -0
  366. data/ext/protoc/protobuf/src/google/protobuf/message_lite.cc +335 -0
  367. data/ext/protoc/protobuf/src/google/protobuf/message_lite.h +247 -0
  368. data/ext/protoc/protobuf/src/google/protobuf/message_unittest.cc +427 -0
  369. data/ext/protoc/protobuf/src/google/protobuf/package_info.h +64 -0
  370. data/ext/protoc/protobuf/src/google/protobuf/reflection_ops.cc +269 -0
  371. data/ext/protoc/protobuf/src/google/protobuf/reflection_ops.h +81 -0
  372. data/ext/protoc/protobuf/src/google/protobuf/reflection_ops_unittest.cc +475 -0
  373. data/ext/protoc/protobuf/src/google/protobuf/repeated_field.cc +87 -0
  374. data/ext/protoc/protobuf/src/google/protobuf/repeated_field.h +1603 -0
  375. data/ext/protoc/protobuf/src/google/protobuf/repeated_field_reflection_unittest.cc +195 -0
  376. data/ext/protoc/protobuf/src/google/protobuf/repeated_field_unittest.cc +1442 -0
  377. data/ext/protoc/protobuf/src/google/protobuf/service.cc +46 -0
  378. data/ext/protoc/protobuf/src/google/protobuf/service.h +291 -0
  379. data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops.h +227 -0
  380. data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_arm64_gcc.h +325 -0
  381. data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_arm_gcc.h +151 -0
  382. data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_arm_qnx.h +146 -0
  383. data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_atomicword_compat.h +122 -0
  384. data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_generic_gcc.h +137 -0
  385. data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_macosx.h +225 -0
  386. data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_mips_gcc.h +313 -0
  387. data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_pnacl.h +73 -0
  388. data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_solaris.h +188 -0
  389. data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_tsan.h +219 -0
  390. data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc +137 -0
  391. data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_gcc.h +293 -0
  392. data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc +112 -0
  393. data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_msvc.h +150 -0
  394. data/ext/protoc/protobuf/src/google/protobuf/stubs/common.cc +395 -0
  395. data/ext/protoc/protobuf/src/google/protobuf/stubs/common.h +1226 -0
  396. data/ext/protoc/protobuf/src/google/protobuf/stubs/common_unittest.cc +357 -0
  397. data/ext/protoc/protobuf/src/google/protobuf/stubs/hash.h +232 -0
  398. data/ext/protoc/protobuf/src/google/protobuf/stubs/map_util.h +771 -0
  399. data/ext/protoc/protobuf/src/google/protobuf/stubs/once.cc +99 -0
  400. data/ext/protoc/protobuf/src/google/protobuf/stubs/once.h +166 -0
  401. data/ext/protoc/protobuf/src/google/protobuf/stubs/once_unittest.cc +253 -0
  402. data/ext/protoc/protobuf/src/google/protobuf/stubs/platform_macros.h +103 -0
  403. data/ext/protoc/protobuf/src/google/protobuf/stubs/shared_ptr.h +470 -0
  404. data/ext/protoc/protobuf/src/google/protobuf/stubs/stl_util.h +121 -0
  405. data/ext/protoc/protobuf/src/google/protobuf/stubs/stringprintf.cc +175 -0
  406. data/ext/protoc/protobuf/src/google/protobuf/stubs/stringprintf.h +76 -0
  407. data/ext/protoc/protobuf/src/google/protobuf/stubs/stringprintf_unittest.cc +152 -0
  408. data/ext/protoc/protobuf/src/google/protobuf/stubs/structurally_valid.cc +536 -0
  409. data/ext/protoc/protobuf/src/google/protobuf/stubs/structurally_valid_unittest.cc +40 -0
  410. data/ext/protoc/protobuf/src/google/protobuf/stubs/strutil.cc +1279 -0
  411. data/ext/protoc/protobuf/src/google/protobuf/stubs/strutil.h +562 -0
  412. data/ext/protoc/protobuf/src/google/protobuf/stubs/strutil_unittest.cc +73 -0
  413. data/ext/protoc/protobuf/src/google/protobuf/stubs/substitute.cc +134 -0
  414. data/ext/protoc/protobuf/src/google/protobuf/stubs/substitute.h +170 -0
  415. data/ext/protoc/protobuf/src/google/protobuf/stubs/template_util.h +138 -0
  416. data/ext/protoc/protobuf/src/google/protobuf/stubs/template_util_unittest.cc +130 -0
  417. data/ext/protoc/protobuf/src/google/protobuf/stubs/type_traits.h +336 -0
  418. data/ext/protoc/protobuf/src/google/protobuf/stubs/type_traits_unittest.cc +628 -0
  419. data/ext/protoc/protobuf/src/google/protobuf/test_util.cc +3345 -0
  420. data/ext/protoc/protobuf/src/google/protobuf/test_util.h +215 -0
  421. data/ext/protoc/protobuf/src/google/protobuf/test_util_lite.cc +1585 -0
  422. data/ext/protoc/protobuf/src/google/protobuf/test_util_lite.h +101 -0
  423. data/ext/protoc/protobuf/src/google/protobuf/testdata/bad_utf8_string +1 -0
  424. data/ext/protoc/protobuf/src/google/protobuf/testdata/golden_message +0 -0
  425. data/ext/protoc/protobuf/src/google/protobuf/testdata/golden_message_oneof_implemented +0 -0
  426. data/ext/protoc/protobuf/src/google/protobuf/testdata/golden_packed_fields_message +0 -0
  427. data/ext/protoc/protobuf/src/google/protobuf/testdata/text_format_unittest_data.txt +134 -0
  428. data/ext/protoc/protobuf/src/google/protobuf/testdata/text_format_unittest_data_oneof_implemented.txt +129 -0
  429. data/ext/protoc/protobuf/src/google/protobuf/testdata/text_format_unittest_data_pointy.txt +134 -0
  430. data/ext/protoc/protobuf/src/google/protobuf/testdata/text_format_unittest_data_pointy_oneof.txt +129 -0
  431. data/ext/protoc/protobuf/src/google/protobuf/testdata/text_format_unittest_extensions_data.txt +134 -0
  432. data/ext/protoc/protobuf/src/google/protobuf/testdata/text_format_unittest_extensions_data_pointy.txt +134 -0
  433. data/ext/protoc/protobuf/src/google/protobuf/testing/file.cc +194 -0
  434. data/ext/protoc/protobuf/src/google/protobuf/testing/file.h +97 -0
  435. data/ext/protoc/protobuf/src/google/protobuf/testing/googletest.cc +255 -0
  436. data/ext/protoc/protobuf/src/google/protobuf/testing/googletest.h +102 -0
  437. data/ext/protoc/protobuf/src/google/protobuf/testing/zcgunzip.cc +73 -0
  438. data/ext/protoc/protobuf/src/google/protobuf/testing/zcgzip.cc +79 -0
  439. data/ext/protoc/protobuf/src/google/protobuf/text_format.cc +1746 -0
  440. data/ext/protoc/protobuf/src/google/protobuf/text_format.h +473 -0
  441. data/ext/protoc/protobuf/src/google/protobuf/text_format_unittest.cc +1479 -0
  442. data/ext/protoc/protobuf/src/google/protobuf/unittest.proto +861 -0
  443. data/ext/protoc/protobuf/src/google/protobuf/unittest_custom_options.proto +393 -0
  444. data/ext/protoc/protobuf/src/google/protobuf/unittest_embed_optimize_for.proto +50 -0
  445. data/ext/protoc/protobuf/src/google/protobuf/unittest_empty.proto +37 -0
  446. data/ext/protoc/protobuf/src/google/protobuf/unittest_enormous_descriptor.proto +1046 -0
  447. data/ext/protoc/protobuf/src/google/protobuf/unittest_import.proto +64 -0
  448. data/ext/protoc/protobuf/src/google/protobuf/unittest_import_lite.proto +51 -0
  449. data/ext/protoc/protobuf/src/google/protobuf/unittest_import_public.proto +40 -0
  450. data/ext/protoc/protobuf/src/google/protobuf/unittest_import_public_lite.proto +42 -0
  451. data/ext/protoc/protobuf/src/google/protobuf/unittest_lite.proto +384 -0
  452. data/ext/protoc/protobuf/src/google/protobuf/unittest_lite_imports_nonlite.proto +43 -0
  453. data/ext/protoc/protobuf/src/google/protobuf/unittest_mset.proto +83 -0
  454. data/ext/protoc/protobuf/src/google/protobuf/unittest_no_generic_services.proto +53 -0
  455. data/ext/protoc/protobuf/src/google/protobuf/unittest_optimize_for.proto +66 -0
  456. data/ext/protoc/protobuf/src/google/protobuf/unknown_field_set.cc +265 -0
  457. data/ext/protoc/protobuf/src/google/protobuf/unknown_field_set.h +318 -0
  458. data/ext/protoc/protobuf/src/google/protobuf/unknown_field_set_unittest.cc +599 -0
  459. data/ext/protoc/protobuf/src/google/protobuf/wire_format.cc +1101 -0
  460. data/ext/protoc/protobuf/src/google/protobuf/wire_format.h +336 -0
  461. data/ext/protoc/protobuf/src/google/protobuf/wire_format_lite.cc +471 -0
  462. data/ext/protoc/protobuf/src/google/protobuf/wire_format_lite.h +661 -0
  463. data/ext/protoc/protobuf/src/google/protobuf/wire_format_lite_inl.h +860 -0
  464. data/ext/protoc/protobuf/src/google/protobuf/wire_format_unittest.cc +1120 -0
  465. data/ext/protoc/protobuf/src/solaris/libstdc++.la +51 -0
  466. data/ext/protoc/protobuf/vsprojects/config.h +29 -0
  467. data/ext/protoc/protobuf/vsprojects/convert2008to2005.sh +20 -0
  468. data/ext/protoc/protobuf/vsprojects/extract_includes.bat +50 -0
  469. data/ext/protoc/protobuf/vsprojects/libprotobuf-lite.vcproj +302 -0
  470. data/ext/protoc/protobuf/vsprojects/libprotobuf.vcproj +470 -0
  471. data/ext/protoc/protobuf/vsprojects/libprotoc.vcproj +466 -0
  472. data/ext/protoc/protobuf/vsprojects/lite-test.vcproj +305 -0
  473. data/ext/protoc/protobuf/vsprojects/protobuf.sln +92 -0
  474. data/ext/protoc/protobuf/vsprojects/protoc.vcproj +192 -0
  475. data/ext/protoc/protobuf/vsprojects/readme.txt +114 -0
  476. data/ext/protoc/protobuf/vsprojects/test_plugin.vcproj +209 -0
  477. data/ext/protoc/protobuf/vsprojects/tests.vcproj +681 -0
  478. data/lib/protoc/version.rb +1 -1
  479. metadata +480 -3
@@ -0,0 +1,861 @@
1
+ // Protocol Buffers - Google's data interchange format
2
+ // Copyright 2008 Google Inc. All rights reserved.
3
+ // https://developers.google.com/protocol-buffers/
4
+ //
5
+ // Redistribution and use in source and binary forms, with or without
6
+ // modification, are permitted provided that the following conditions are
7
+ // met:
8
+ //
9
+ // * Redistributions of source code must retain the above copyright
10
+ // notice, this list of conditions and the following disclaimer.
11
+ // * Redistributions in binary form must reproduce the above
12
+ // copyright notice, this list of conditions and the following disclaimer
13
+ // in the documentation and/or other materials provided with the
14
+ // distribution.
15
+ // * Neither the name of Google Inc. nor the names of its
16
+ // contributors may be used to endorse or promote products derived from
17
+ // this software without specific prior written permission.
18
+ //
19
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
+
31
+ // Author: kenton@google.com (Kenton Varda)
32
+ // Based on original Protocol Buffers design by
33
+ // Sanjay Ghemawat, Jeff Dean, and others.
34
+ //
35
+ // A proto file we will use for unit testing.
36
+
37
+
38
+ // Some generic_services option(s) added automatically.
39
+ // See: http://go/proto2-generic-services-default
40
+ option cc_generic_services = true; // auto-added
41
+ option java_generic_services = true; // auto-added
42
+ option py_generic_services = true; // auto-added
43
+
44
+ import "google/protobuf/unittest_import.proto";
45
+
46
+ // We don't put this in a package within proto2 because we need to make sure
47
+ // that the generated code doesn't depend on being in the proto2 namespace.
48
+ // In test_util.h we do "using namespace unittest = protobuf_unittest".
49
+ package protobuf_unittest;
50
+
51
+ // Protos optimized for SPEED use a strict superset of the generated code
52
+ // of equivalent ones optimized for CODE_SIZE, so we should optimize all our
53
+ // tests for speed unless explicitly testing code size optimization.
54
+ option optimize_for = SPEED;
55
+
56
+ option java_outer_classname = "UnittestProto";
57
+
58
+ // This proto includes every type of field in both singular and repeated
59
+ // forms.
60
+ message TestAllTypes {
61
+ message NestedMessage {
62
+ // The field name "b" fails to compile in proto1 because it conflicts with
63
+ // a local variable named "b" in one of the generated methods. Doh.
64
+ // This file needs to compile in proto1 to test backwards-compatibility.
65
+ optional int32 bb = 1;
66
+ }
67
+
68
+ enum NestedEnum {
69
+ FOO = 1;
70
+ BAR = 2;
71
+ BAZ = 3;
72
+ NEG = -1; // Intentionally negative.
73
+ }
74
+
75
+ // Singular
76
+ optional int32 optional_int32 = 1;
77
+ optional int64 optional_int64 = 2;
78
+ optional uint32 optional_uint32 = 3;
79
+ optional uint64 optional_uint64 = 4;
80
+ optional sint32 optional_sint32 = 5;
81
+ optional sint64 optional_sint64 = 6;
82
+ optional fixed32 optional_fixed32 = 7;
83
+ optional fixed64 optional_fixed64 = 8;
84
+ optional sfixed32 optional_sfixed32 = 9;
85
+ optional sfixed64 optional_sfixed64 = 10;
86
+ optional float optional_float = 11;
87
+ optional double optional_double = 12;
88
+ optional bool optional_bool = 13;
89
+ optional string optional_string = 14;
90
+ optional bytes optional_bytes = 15;
91
+
92
+ optional group OptionalGroup = 16 {
93
+ optional int32 a = 17;
94
+ }
95
+
96
+ optional NestedMessage optional_nested_message = 18;
97
+ optional ForeignMessage optional_foreign_message = 19;
98
+ optional protobuf_unittest_import.ImportMessage optional_import_message = 20;
99
+
100
+ optional NestedEnum optional_nested_enum = 21;
101
+ optional ForeignEnum optional_foreign_enum = 22;
102
+ optional protobuf_unittest_import.ImportEnum optional_import_enum = 23;
103
+
104
+ optional string optional_string_piece = 24 [ctype=STRING_PIECE];
105
+ optional string optional_cord = 25 [ctype=CORD];
106
+
107
+ // Defined in unittest_import_public.proto
108
+ optional protobuf_unittest_import.PublicImportMessage
109
+ optional_public_import_message = 26;
110
+
111
+ optional NestedMessage optional_lazy_message = 27 [lazy=true];
112
+
113
+ // Repeated
114
+ repeated int32 repeated_int32 = 31;
115
+ repeated int64 repeated_int64 = 32;
116
+ repeated uint32 repeated_uint32 = 33;
117
+ repeated uint64 repeated_uint64 = 34;
118
+ repeated sint32 repeated_sint32 = 35;
119
+ repeated sint64 repeated_sint64 = 36;
120
+ repeated fixed32 repeated_fixed32 = 37;
121
+ repeated fixed64 repeated_fixed64 = 38;
122
+ repeated sfixed32 repeated_sfixed32 = 39;
123
+ repeated sfixed64 repeated_sfixed64 = 40;
124
+ repeated float repeated_float = 41;
125
+ repeated double repeated_double = 42;
126
+ repeated bool repeated_bool = 43;
127
+ repeated string repeated_string = 44;
128
+ repeated bytes repeated_bytes = 45;
129
+
130
+ repeated group RepeatedGroup = 46 {
131
+ optional int32 a = 47;
132
+ }
133
+
134
+ repeated NestedMessage repeated_nested_message = 48;
135
+ repeated ForeignMessage repeated_foreign_message = 49;
136
+ repeated protobuf_unittest_import.ImportMessage repeated_import_message = 50;
137
+
138
+ repeated NestedEnum repeated_nested_enum = 51;
139
+ repeated ForeignEnum repeated_foreign_enum = 52;
140
+ repeated protobuf_unittest_import.ImportEnum repeated_import_enum = 53;
141
+
142
+ repeated string repeated_string_piece = 54 [ctype=STRING_PIECE];
143
+ repeated string repeated_cord = 55 [ctype=CORD];
144
+
145
+ repeated NestedMessage repeated_lazy_message = 57 [lazy=true];
146
+
147
+ // Singular with defaults
148
+ optional int32 default_int32 = 61 [default = 41 ];
149
+ optional int64 default_int64 = 62 [default = 42 ];
150
+ optional uint32 default_uint32 = 63 [default = 43 ];
151
+ optional uint64 default_uint64 = 64 [default = 44 ];
152
+ optional sint32 default_sint32 = 65 [default = -45 ];
153
+ optional sint64 default_sint64 = 66 [default = 46 ];
154
+ optional fixed32 default_fixed32 = 67 [default = 47 ];
155
+ optional fixed64 default_fixed64 = 68 [default = 48 ];
156
+ optional sfixed32 default_sfixed32 = 69 [default = 49 ];
157
+ optional sfixed64 default_sfixed64 = 70 [default = -50 ];
158
+ optional float default_float = 71 [default = 51.5 ];
159
+ optional double default_double = 72 [default = 52e3 ];
160
+ optional bool default_bool = 73 [default = true ];
161
+ optional string default_string = 74 [default = "hello"];
162
+ optional bytes default_bytes = 75 [default = "world"];
163
+
164
+ optional NestedEnum default_nested_enum = 81 [default = BAR ];
165
+ optional ForeignEnum default_foreign_enum = 82 [default = FOREIGN_BAR];
166
+ optional protobuf_unittest_import.ImportEnum
167
+ default_import_enum = 83 [default = IMPORT_BAR];
168
+
169
+ optional string default_string_piece = 84 [ctype=STRING_PIECE,default="abc"];
170
+ optional string default_cord = 85 [ctype=CORD,default="123"];
171
+
172
+ // For oneof test
173
+ oneof oneof_field {
174
+ uint32 oneof_uint32 = 111;
175
+ NestedMessage oneof_nested_message = 112;
176
+ string oneof_string = 113;
177
+ bytes oneof_bytes = 114;
178
+ }
179
+ }
180
+
181
+ // This proto includes a recusively nested message.
182
+ message NestedTestAllTypes {
183
+ optional NestedTestAllTypes child = 1;
184
+ optional TestAllTypes payload = 2;
185
+ }
186
+
187
+ message TestDeprecatedFields {
188
+ optional int32 deprecated_int32 = 1 [deprecated=true];
189
+ }
190
+
191
+ // Define these after TestAllTypes to make sure the compiler can handle
192
+ // that.
193
+ message ForeignMessage {
194
+ optional int32 c = 1;
195
+ }
196
+
197
+ enum ForeignEnum {
198
+ FOREIGN_FOO = 4;
199
+ FOREIGN_BAR = 5;
200
+ FOREIGN_BAZ = 6;
201
+ }
202
+
203
+ message TestAllExtensions {
204
+ extensions 1 to max;
205
+ }
206
+
207
+ extend TestAllExtensions {
208
+ // Singular
209
+ optional int32 optional_int32_extension = 1;
210
+ optional int64 optional_int64_extension = 2;
211
+ optional uint32 optional_uint32_extension = 3;
212
+ optional uint64 optional_uint64_extension = 4;
213
+ optional sint32 optional_sint32_extension = 5;
214
+ optional sint64 optional_sint64_extension = 6;
215
+ optional fixed32 optional_fixed32_extension = 7;
216
+ optional fixed64 optional_fixed64_extension = 8;
217
+ optional sfixed32 optional_sfixed32_extension = 9;
218
+ optional sfixed64 optional_sfixed64_extension = 10;
219
+ optional float optional_float_extension = 11;
220
+ optional double optional_double_extension = 12;
221
+ optional bool optional_bool_extension = 13;
222
+ optional string optional_string_extension = 14;
223
+ optional bytes optional_bytes_extension = 15;
224
+
225
+ optional group OptionalGroup_extension = 16 {
226
+ optional int32 a = 17;
227
+ }
228
+
229
+ optional TestAllTypes.NestedMessage optional_nested_message_extension = 18;
230
+ optional ForeignMessage optional_foreign_message_extension = 19;
231
+ optional protobuf_unittest_import.ImportMessage
232
+ optional_import_message_extension = 20;
233
+
234
+ optional TestAllTypes.NestedEnum optional_nested_enum_extension = 21;
235
+ optional ForeignEnum optional_foreign_enum_extension = 22;
236
+ optional protobuf_unittest_import.ImportEnum
237
+ optional_import_enum_extension = 23;
238
+
239
+ optional string optional_string_piece_extension = 24 [ctype=STRING_PIECE];
240
+ optional string optional_cord_extension = 25 [ctype=CORD];
241
+
242
+ optional protobuf_unittest_import.PublicImportMessage
243
+ optional_public_import_message_extension = 26;
244
+
245
+ optional TestAllTypes.NestedMessage
246
+ optional_lazy_message_extension = 27 [lazy=true];
247
+
248
+ // Repeated
249
+ repeated int32 repeated_int32_extension = 31;
250
+ repeated int64 repeated_int64_extension = 32;
251
+ repeated uint32 repeated_uint32_extension = 33;
252
+ repeated uint64 repeated_uint64_extension = 34;
253
+ repeated sint32 repeated_sint32_extension = 35;
254
+ repeated sint64 repeated_sint64_extension = 36;
255
+ repeated fixed32 repeated_fixed32_extension = 37;
256
+ repeated fixed64 repeated_fixed64_extension = 38;
257
+ repeated sfixed32 repeated_sfixed32_extension = 39;
258
+ repeated sfixed64 repeated_sfixed64_extension = 40;
259
+ repeated float repeated_float_extension = 41;
260
+ repeated double repeated_double_extension = 42;
261
+ repeated bool repeated_bool_extension = 43;
262
+ repeated string repeated_string_extension = 44;
263
+ repeated bytes repeated_bytes_extension = 45;
264
+
265
+ repeated group RepeatedGroup_extension = 46 {
266
+ optional int32 a = 47;
267
+ }
268
+
269
+ repeated TestAllTypes.NestedMessage repeated_nested_message_extension = 48;
270
+ repeated ForeignMessage repeated_foreign_message_extension = 49;
271
+ repeated protobuf_unittest_import.ImportMessage
272
+ repeated_import_message_extension = 50;
273
+
274
+ repeated TestAllTypes.NestedEnum repeated_nested_enum_extension = 51;
275
+ repeated ForeignEnum repeated_foreign_enum_extension = 52;
276
+ repeated protobuf_unittest_import.ImportEnum
277
+ repeated_import_enum_extension = 53;
278
+
279
+ repeated string repeated_string_piece_extension = 54 [ctype=STRING_PIECE];
280
+ repeated string repeated_cord_extension = 55 [ctype=CORD];
281
+
282
+ repeated TestAllTypes.NestedMessage
283
+ repeated_lazy_message_extension = 57 [lazy=true];
284
+
285
+ // Singular with defaults
286
+ optional int32 default_int32_extension = 61 [default = 41 ];
287
+ optional int64 default_int64_extension = 62 [default = 42 ];
288
+ optional uint32 default_uint32_extension = 63 [default = 43 ];
289
+ optional uint64 default_uint64_extension = 64 [default = 44 ];
290
+ optional sint32 default_sint32_extension = 65 [default = -45 ];
291
+ optional sint64 default_sint64_extension = 66 [default = 46 ];
292
+ optional fixed32 default_fixed32_extension = 67 [default = 47 ];
293
+ optional fixed64 default_fixed64_extension = 68 [default = 48 ];
294
+ optional sfixed32 default_sfixed32_extension = 69 [default = 49 ];
295
+ optional sfixed64 default_sfixed64_extension = 70 [default = -50 ];
296
+ optional float default_float_extension = 71 [default = 51.5 ];
297
+ optional double default_double_extension = 72 [default = 52e3 ];
298
+ optional bool default_bool_extension = 73 [default = true ];
299
+ optional string default_string_extension = 74 [default = "hello"];
300
+ optional bytes default_bytes_extension = 75 [default = "world"];
301
+
302
+ optional TestAllTypes.NestedEnum
303
+ default_nested_enum_extension = 81 [default = BAR];
304
+ optional ForeignEnum
305
+ default_foreign_enum_extension = 82 [default = FOREIGN_BAR];
306
+ optional protobuf_unittest_import.ImportEnum
307
+ default_import_enum_extension = 83 [default = IMPORT_BAR];
308
+
309
+ optional string default_string_piece_extension = 84 [ctype=STRING_PIECE,
310
+ default="abc"];
311
+ optional string default_cord_extension = 85 [ctype=CORD, default="123"];
312
+
313
+ // For oneof test
314
+ optional uint32 oneof_uint32_extension = 111;
315
+ optional TestAllTypes.NestedMessage oneof_nested_message_extension = 112;
316
+ optional string oneof_string_extension = 113;
317
+ optional bytes oneof_bytes_extension = 114;
318
+ }
319
+
320
+ message TestNestedExtension {
321
+ extend TestAllExtensions {
322
+ // Check for bug where string extensions declared in tested scope did not
323
+ // compile.
324
+ optional string test = 1002 [default="test"];
325
+ // Used to test if generated extension name is correct when there are
326
+ // underscores.
327
+ optional string nested_string_extension = 1003;
328
+ }
329
+ }
330
+
331
+ // We have separate messages for testing required fields because it's
332
+ // annoying to have to fill in required fields in TestProto in order to
333
+ // do anything with it. Note that we don't need to test every type of
334
+ // required filed because the code output is basically identical to
335
+ // optional fields for all types.
336
+ message TestRequired {
337
+ required int32 a = 1;
338
+ optional int32 dummy2 = 2;
339
+ required int32 b = 3;
340
+
341
+ extend TestAllExtensions {
342
+ optional TestRequired single = 1000;
343
+ repeated TestRequired multi = 1001;
344
+ }
345
+
346
+ // Pad the field count to 32 so that we can test that IsInitialized()
347
+ // properly checks multiple elements of has_bits_.
348
+ optional int32 dummy4 = 4;
349
+ optional int32 dummy5 = 5;
350
+ optional int32 dummy6 = 6;
351
+ optional int32 dummy7 = 7;
352
+ optional int32 dummy8 = 8;
353
+ optional int32 dummy9 = 9;
354
+ optional int32 dummy10 = 10;
355
+ optional int32 dummy11 = 11;
356
+ optional int32 dummy12 = 12;
357
+ optional int32 dummy13 = 13;
358
+ optional int32 dummy14 = 14;
359
+ optional int32 dummy15 = 15;
360
+ optional int32 dummy16 = 16;
361
+ optional int32 dummy17 = 17;
362
+ optional int32 dummy18 = 18;
363
+ optional int32 dummy19 = 19;
364
+ optional int32 dummy20 = 20;
365
+ optional int32 dummy21 = 21;
366
+ optional int32 dummy22 = 22;
367
+ optional int32 dummy23 = 23;
368
+ optional int32 dummy24 = 24;
369
+ optional int32 dummy25 = 25;
370
+ optional int32 dummy26 = 26;
371
+ optional int32 dummy27 = 27;
372
+ optional int32 dummy28 = 28;
373
+ optional int32 dummy29 = 29;
374
+ optional int32 dummy30 = 30;
375
+ optional int32 dummy31 = 31;
376
+ optional int32 dummy32 = 32;
377
+
378
+ required int32 c = 33;
379
+ }
380
+
381
+ message TestRequiredForeign {
382
+ optional TestRequired optional_message = 1;
383
+ repeated TestRequired repeated_message = 2;
384
+ optional int32 dummy = 3;
385
+ }
386
+
387
+ // Test that we can use NestedMessage from outside TestAllTypes.
388
+ message TestForeignNested {
389
+ optional TestAllTypes.NestedMessage foreign_nested = 1;
390
+ }
391
+
392
+ // TestEmptyMessage is used to test unknown field support.
393
+ message TestEmptyMessage {
394
+ }
395
+
396
+ // Like above, but declare all field numbers as potential extensions. No
397
+ // actual extensions should ever be defined for this type.
398
+ message TestEmptyMessageWithExtensions {
399
+ extensions 1 to max;
400
+ }
401
+
402
+ message TestMultipleExtensionRanges {
403
+ extensions 42;
404
+ extensions 4143 to 4243;
405
+ extensions 65536 to max;
406
+ }
407
+
408
+ // Test that really large tag numbers don't break anything.
409
+ message TestReallyLargeTagNumber {
410
+ // The largest possible tag number is 2^28 - 1, since the wire format uses
411
+ // three bits to communicate wire type.
412
+ optional int32 a = 1;
413
+ optional int32 bb = 268435455;
414
+ }
415
+
416
+ message TestRecursiveMessage {
417
+ optional TestRecursiveMessage a = 1;
418
+ optional int32 i = 2;
419
+ }
420
+
421
+ // Test that mutual recursion works.
422
+ message TestMutualRecursionA {
423
+ optional TestMutualRecursionB bb = 1;
424
+ }
425
+
426
+ message TestMutualRecursionB {
427
+ optional TestMutualRecursionA a = 1;
428
+ optional int32 optional_int32 = 2;
429
+ }
430
+
431
+ // Test that groups have disjoint field numbers from their siblings and
432
+ // parents. This is NOT possible in proto1; only proto2. When attempting
433
+ // to compile with proto1, this will emit an error; so we only include it
434
+ // in protobuf_unittest_proto.
435
+ message TestDupFieldNumber { // NO_PROTO1
436
+ optional int32 a = 1; // NO_PROTO1
437
+ optional group Foo = 2 { optional int32 a = 1; } // NO_PROTO1
438
+ optional group Bar = 3 { optional int32 a = 1; } // NO_PROTO1
439
+ } // NO_PROTO1
440
+
441
+ // Additional messages for testing lazy fields.
442
+ message TestEagerMessage {
443
+ optional TestAllTypes sub_message = 1 [lazy=false];
444
+ }
445
+ message TestLazyMessage {
446
+ optional TestAllTypes sub_message = 1 [lazy=true];
447
+ }
448
+
449
+ // Needed for a Python test.
450
+ message TestNestedMessageHasBits {
451
+ message NestedMessage {
452
+ repeated int32 nestedmessage_repeated_int32 = 1;
453
+ repeated ForeignMessage nestedmessage_repeated_foreignmessage = 2;
454
+ }
455
+ optional NestedMessage optional_nested_message = 1;
456
+ }
457
+
458
+
459
+ // Test an enum that has multiple values with the same number.
460
+ enum TestEnumWithDupValue {
461
+ option allow_alias = true;
462
+
463
+ FOO1 = 1;
464
+ BAR1 = 2;
465
+ BAZ = 3;
466
+ FOO2 = 1;
467
+ BAR2 = 2;
468
+ }
469
+
470
+ // Test an enum with large, unordered values.
471
+ enum TestSparseEnum {
472
+ SPARSE_A = 123;
473
+ SPARSE_B = 62374;
474
+ SPARSE_C = 12589234;
475
+ SPARSE_D = -15;
476
+ SPARSE_E = -53452;
477
+ SPARSE_F = 0;
478
+ SPARSE_G = 2;
479
+ }
480
+
481
+ // Test message with CamelCase field names. This violates Protocol Buffer
482
+ // standard style.
483
+ message TestCamelCaseFieldNames {
484
+ optional int32 PrimitiveField = 1;
485
+ optional string StringField = 2;
486
+ optional ForeignEnum EnumField = 3;
487
+ optional ForeignMessage MessageField = 4;
488
+ optional string StringPieceField = 5 [ctype=STRING_PIECE];
489
+ optional string CordField = 6 [ctype=CORD];
490
+
491
+ repeated int32 RepeatedPrimitiveField = 7;
492
+ repeated string RepeatedStringField = 8;
493
+ repeated ForeignEnum RepeatedEnumField = 9;
494
+ repeated ForeignMessage RepeatedMessageField = 10;
495
+ repeated string RepeatedStringPieceField = 11 [ctype=STRING_PIECE];
496
+ repeated string RepeatedCordField = 12 [ctype=CORD];
497
+ }
498
+
499
+
500
+ // We list fields out of order, to ensure that we're using field number and not
501
+ // field index to determine serialization order.
502
+ message TestFieldOrderings {
503
+ optional string my_string = 11;
504
+ extensions 2 to 10;
505
+ optional int64 my_int = 1;
506
+ extensions 12 to 100;
507
+ optional float my_float = 101;
508
+ }
509
+
510
+
511
+ extend TestFieldOrderings {
512
+ optional string my_extension_string = 50;
513
+ optional int32 my_extension_int = 5;
514
+ }
515
+
516
+
517
+ message TestExtremeDefaultValues {
518
+ optional bytes escaped_bytes = 1 [default = "\0\001\a\b\f\n\r\t\v\\\'\"\xfe"];
519
+ optional uint32 large_uint32 = 2 [default = 0xFFFFFFFF];
520
+ optional uint64 large_uint64 = 3 [default = 0xFFFFFFFFFFFFFFFF];
521
+ optional int32 small_int32 = 4 [default = -0x7FFFFFFF];
522
+ optional int64 small_int64 = 5 [default = -0x7FFFFFFFFFFFFFFF];
523
+ optional int32 really_small_int32 = 21 [default = -0x80000000];
524
+ optional int64 really_small_int64 = 22 [default = -0x8000000000000000];
525
+
526
+ // The default value here is UTF-8 for "\u1234". (We could also just type
527
+ // the UTF-8 text directly into this text file rather than escape it, but
528
+ // lots of people use editors that would be confused by this.)
529
+ optional string utf8_string = 6 [default = "\341\210\264"];
530
+
531
+ // Tests for single-precision floating-point values.
532
+ optional float zero_float = 7 [default = 0];
533
+ optional float one_float = 8 [default = 1];
534
+ optional float small_float = 9 [default = 1.5];
535
+ optional float negative_one_float = 10 [default = -1];
536
+ optional float negative_float = 11 [default = -1.5];
537
+ // Using exponents
538
+ optional float large_float = 12 [default = 2E8];
539
+ optional float small_negative_float = 13 [default = -8e-28];
540
+
541
+ // Text for nonfinite floating-point values.
542
+ optional double inf_double = 14 [default = inf];
543
+ optional double neg_inf_double = 15 [default = -inf];
544
+ optional double nan_double = 16 [default = nan];
545
+ optional float inf_float = 17 [default = inf];
546
+ optional float neg_inf_float = 18 [default = -inf];
547
+ optional float nan_float = 19 [default = nan];
548
+
549
+ // Tests for C++ trigraphs.
550
+ // Trigraphs should be escaped in C++ generated files, but they should not be
551
+ // escaped for other languages.
552
+ // Note that in .proto file, "\?" is a valid way to escape ? in string
553
+ // literals.
554
+ optional string cpp_trigraph = 20 [default = "? \? ?? \?? \??? ??/ ?\?-"];
555
+
556
+ // String defaults containing the character '\000'
557
+ optional string string_with_zero = 23 [default = "hel\000lo"];
558
+ optional bytes bytes_with_zero = 24 [default = "wor\000ld"];
559
+ optional string string_piece_with_zero = 25 [ctype=STRING_PIECE,
560
+ default="ab\000c"];
561
+ optional string cord_with_zero = 26 [ctype=CORD,
562
+ default="12\0003"];
563
+ optional string replacement_string = 27 [default="${unknown}"];
564
+ }
565
+
566
+ message SparseEnumMessage {
567
+ optional TestSparseEnum sparse_enum = 1;
568
+ }
569
+
570
+ // Test String and Bytes: string is for valid UTF-8 strings
571
+ message OneString {
572
+ optional string data = 1;
573
+ }
574
+
575
+ message MoreString {
576
+ repeated string data = 1;
577
+ }
578
+
579
+ message OneBytes {
580
+ optional bytes data = 1;
581
+ }
582
+
583
+ message MoreBytes {
584
+ repeated bytes data = 1;
585
+ }
586
+
587
+ // Test int32, uint32, int64, uint64, and bool are all compatible
588
+ message Int32Message {
589
+ optional int32 data = 1;
590
+ }
591
+
592
+ message Uint32Message {
593
+ optional uint32 data = 1;
594
+ }
595
+
596
+ message Int64Message {
597
+ optional int64 data = 1;
598
+ }
599
+
600
+ message Uint64Message {
601
+ optional uint64 data = 1;
602
+ }
603
+
604
+ message BoolMessage {
605
+ optional bool data = 1;
606
+ }
607
+
608
+ // Test oneofs.
609
+ message TestOneof {
610
+ oneof foo {
611
+ int32 foo_int = 1;
612
+ string foo_string = 2;
613
+ TestAllTypes foo_message = 3;
614
+ group FooGroup = 4 {
615
+ optional int32 a = 5;
616
+ optional string b = 6;
617
+ }
618
+ }
619
+ }
620
+
621
+ message TestOneofBackwardsCompatible {
622
+ optional int32 foo_int = 1;
623
+ optional string foo_string = 2;
624
+ optional TestAllTypes foo_message = 3;
625
+ optional group FooGroup = 4 {
626
+ optional int32 a = 5;
627
+ optional string b = 6;
628
+ }
629
+ }
630
+
631
+ message TestOneof2 {
632
+ oneof foo {
633
+ int32 foo_int = 1;
634
+ string foo_string = 2;
635
+ string foo_cord = 3 [ctype=CORD];
636
+ string foo_string_piece = 4 [ctype=STRING_PIECE];
637
+ bytes foo_bytes = 5;
638
+ NestedEnum foo_enum = 6;
639
+ NestedMessage foo_message = 7;
640
+ group FooGroup = 8 {
641
+ optional int32 a = 9;
642
+ optional string b = 10;
643
+ }
644
+ NestedMessage foo_lazy_message = 11 [lazy=true];
645
+ }
646
+
647
+ oneof bar {
648
+ int32 bar_int = 12 [default = 5];
649
+ string bar_string = 13 [default = "STRING"];
650
+ string bar_cord = 14 [ctype=CORD, default = "CORD"];
651
+ string bar_string_piece = 15 [ctype=STRING_PIECE, default = "SPIECE"];
652
+ bytes bar_bytes = 16 [default = "BYTES"];
653
+ NestedEnum bar_enum = 17 [default = BAR];
654
+ }
655
+
656
+ optional int32 baz_int = 18;
657
+ optional string baz_string = 19 [default = "BAZ"];
658
+
659
+ message NestedMessage {
660
+ optional int64 qux_int = 1;
661
+ repeated int32 corge_int = 2;
662
+ }
663
+
664
+ enum NestedEnum {
665
+ FOO = 1;
666
+ BAR = 2;
667
+ BAZ = 3;
668
+ }
669
+ }
670
+
671
+ message TestRequiredOneof {
672
+ oneof foo {
673
+ int32 foo_int = 1;
674
+ string foo_string = 2;
675
+ NestedMessage foo_message = 3;
676
+ }
677
+ message NestedMessage {
678
+ required double required_double = 1;
679
+ }
680
+ }
681
+
682
+ // Test messages for packed fields
683
+
684
+ message TestPackedTypes {
685
+ repeated int32 packed_int32 = 90 [packed = true];
686
+ repeated int64 packed_int64 = 91 [packed = true];
687
+ repeated uint32 packed_uint32 = 92 [packed = true];
688
+ repeated uint64 packed_uint64 = 93 [packed = true];
689
+ repeated sint32 packed_sint32 = 94 [packed = true];
690
+ repeated sint64 packed_sint64 = 95 [packed = true];
691
+ repeated fixed32 packed_fixed32 = 96 [packed = true];
692
+ repeated fixed64 packed_fixed64 = 97 [packed = true];
693
+ repeated sfixed32 packed_sfixed32 = 98 [packed = true];
694
+ repeated sfixed64 packed_sfixed64 = 99 [packed = true];
695
+ repeated float packed_float = 100 [packed = true];
696
+ repeated double packed_double = 101 [packed = true];
697
+ repeated bool packed_bool = 102 [packed = true];
698
+ repeated ForeignEnum packed_enum = 103 [packed = true];
699
+ }
700
+
701
+ // A message with the same fields as TestPackedTypes, but without packing. Used
702
+ // to test packed <-> unpacked wire compatibility.
703
+ message TestUnpackedTypes {
704
+ repeated int32 unpacked_int32 = 90 [packed = false];
705
+ repeated int64 unpacked_int64 = 91 [packed = false];
706
+ repeated uint32 unpacked_uint32 = 92 [packed = false];
707
+ repeated uint64 unpacked_uint64 = 93 [packed = false];
708
+ repeated sint32 unpacked_sint32 = 94 [packed = false];
709
+ repeated sint64 unpacked_sint64 = 95 [packed = false];
710
+ repeated fixed32 unpacked_fixed32 = 96 [packed = false];
711
+ repeated fixed64 unpacked_fixed64 = 97 [packed = false];
712
+ repeated sfixed32 unpacked_sfixed32 = 98 [packed = false];
713
+ repeated sfixed64 unpacked_sfixed64 = 99 [packed = false];
714
+ repeated float unpacked_float = 100 [packed = false];
715
+ repeated double unpacked_double = 101 [packed = false];
716
+ repeated bool unpacked_bool = 102 [packed = false];
717
+ repeated ForeignEnum unpacked_enum = 103 [packed = false];
718
+ }
719
+
720
+ message TestPackedExtensions {
721
+ extensions 1 to max;
722
+ }
723
+
724
+ extend TestPackedExtensions {
725
+ repeated int32 packed_int32_extension = 90 [packed = true];
726
+ repeated int64 packed_int64_extension = 91 [packed = true];
727
+ repeated uint32 packed_uint32_extension = 92 [packed = true];
728
+ repeated uint64 packed_uint64_extension = 93 [packed = true];
729
+ repeated sint32 packed_sint32_extension = 94 [packed = true];
730
+ repeated sint64 packed_sint64_extension = 95 [packed = true];
731
+ repeated fixed32 packed_fixed32_extension = 96 [packed = true];
732
+ repeated fixed64 packed_fixed64_extension = 97 [packed = true];
733
+ repeated sfixed32 packed_sfixed32_extension = 98 [packed = true];
734
+ repeated sfixed64 packed_sfixed64_extension = 99 [packed = true];
735
+ repeated float packed_float_extension = 100 [packed = true];
736
+ repeated double packed_double_extension = 101 [packed = true];
737
+ repeated bool packed_bool_extension = 102 [packed = true];
738
+ repeated ForeignEnum packed_enum_extension = 103 [packed = true];
739
+ }
740
+
741
+ message TestUnpackedExtensions {
742
+ extensions 1 to max;
743
+ }
744
+
745
+ extend TestUnpackedExtensions {
746
+ repeated int32 unpacked_int32_extension = 90 [packed = false];
747
+ repeated int64 unpacked_int64_extension = 91 [packed = false];
748
+ repeated uint32 unpacked_uint32_extension = 92 [packed = false];
749
+ repeated uint64 unpacked_uint64_extension = 93 [packed = false];
750
+ repeated sint32 unpacked_sint32_extension = 94 [packed = false];
751
+ repeated sint64 unpacked_sint64_extension = 95 [packed = false];
752
+ repeated fixed32 unpacked_fixed32_extension = 96 [packed = false];
753
+ repeated fixed64 unpacked_fixed64_extension = 97 [packed = false];
754
+ repeated sfixed32 unpacked_sfixed32_extension = 98 [packed = false];
755
+ repeated sfixed64 unpacked_sfixed64_extension = 99 [packed = false];
756
+ repeated float unpacked_float_extension = 100 [packed = false];
757
+ repeated double unpacked_double_extension = 101 [packed = false];
758
+ repeated bool unpacked_bool_extension = 102 [packed = false];
759
+ repeated ForeignEnum unpacked_enum_extension = 103 [packed = false];
760
+ }
761
+
762
+ // Used by ExtensionSetTest/DynamicExtensions. The test actually builds
763
+ // a set of extensions to TestAllExtensions dynamically, based on the fields
764
+ // of this message type.
765
+ message TestDynamicExtensions {
766
+ enum DynamicEnumType {
767
+ DYNAMIC_FOO = 2200;
768
+ DYNAMIC_BAR = 2201;
769
+ DYNAMIC_BAZ = 2202;
770
+ }
771
+ message DynamicMessageType {
772
+ optional int32 dynamic_field = 2100;
773
+ }
774
+
775
+ optional fixed32 scalar_extension = 2000;
776
+ optional ForeignEnum enum_extension = 2001;
777
+ optional DynamicEnumType dynamic_enum_extension = 2002;
778
+
779
+ optional ForeignMessage message_extension = 2003;
780
+ optional DynamicMessageType dynamic_message_extension = 2004;
781
+
782
+ repeated string repeated_extension = 2005;
783
+ repeated sint32 packed_extension = 2006 [packed = true];
784
+ }
785
+
786
+ message TestRepeatedScalarDifferentTagSizes {
787
+ // Parsing repeated fixed size values used to fail. This message needs to be
788
+ // used in order to get a tag of the right size; all of the repeated fields
789
+ // in TestAllTypes didn't trigger the check.
790
+ repeated fixed32 repeated_fixed32 = 12;
791
+ // Check for a varint type, just for good measure.
792
+ repeated int32 repeated_int32 = 13;
793
+
794
+ // These have two-byte tags.
795
+ repeated fixed64 repeated_fixed64 = 2046;
796
+ repeated int64 repeated_int64 = 2047;
797
+
798
+ // Three byte tags.
799
+ repeated float repeated_float = 262142;
800
+ repeated uint64 repeated_uint64 = 262143;
801
+ }
802
+
803
+ // Test that if an optional or required message/group field appears multiple
804
+ // times in the input, they need to be merged.
805
+ message TestParsingMerge {
806
+ // RepeatedFieldsGenerator defines matching field types as TestParsingMerge,
807
+ // except that all fields are repeated. In the tests, we will serialize the
808
+ // RepeatedFieldsGenerator to bytes, and parse the bytes to TestParsingMerge.
809
+ // Repeated fields in RepeatedFieldsGenerator are expected to be merged into
810
+ // the corresponding required/optional fields in TestParsingMerge.
811
+ message RepeatedFieldsGenerator {
812
+ repeated TestAllTypes field1 = 1;
813
+ repeated TestAllTypes field2 = 2;
814
+ repeated TestAllTypes field3 = 3;
815
+ repeated group Group1 = 10 {
816
+ optional TestAllTypes field1 = 11;
817
+ }
818
+ repeated group Group2 = 20 {
819
+ optional TestAllTypes field1 = 21;
820
+ }
821
+ repeated TestAllTypes ext1 = 1000;
822
+ repeated TestAllTypes ext2 = 1001;
823
+ }
824
+ required TestAllTypes required_all_types = 1;
825
+ optional TestAllTypes optional_all_types = 2;
826
+ repeated TestAllTypes repeated_all_types = 3;
827
+ optional group OptionalGroup = 10 {
828
+ optional TestAllTypes optional_group_all_types = 11;
829
+ }
830
+ repeated group RepeatedGroup = 20 {
831
+ optional TestAllTypes repeated_group_all_types = 21;
832
+ }
833
+ extensions 1000 to max;
834
+ extend TestParsingMerge {
835
+ optional TestAllTypes optional_ext = 1000;
836
+ repeated TestAllTypes repeated_ext = 1001;
837
+ }
838
+ }
839
+
840
+ message TestCommentInjectionMessage {
841
+ // */ <- This should not close the generated doc comment
842
+ optional string a = 1 [default="*/ <- Neither should this."];
843
+ }
844
+
845
+
846
+ // Test that RPC services work.
847
+ message FooRequest {}
848
+ message FooResponse {}
849
+
850
+ message FooClientMessage {}
851
+ message FooServerMessage{}
852
+
853
+ service TestService {
854
+ rpc Foo(FooRequest) returns (FooResponse);
855
+ rpc Bar(BarRequest) returns (BarResponse);
856
+ }
857
+
858
+
859
+ message BarRequest {}
860
+ message BarResponse {}
861
+