OLD | NEW |
1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 Google Inc. All rights reserved. |
3 // http://code.google.com/p/protobuf/ | 3 // https://developers.google.com/protocol-buffers/ |
4 // | 4 // |
5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
7 // met: | 7 // met: |
8 // | 8 // |
9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
11 // * Redistributions in binary form must reproduce the above | 11 // * Redistributions in binary form must reproduce the above |
12 // copyright notice, this list of conditions and the following disclaimer | 12 // copyright notice, this list of conditions and the following disclaimer |
13 // in the documentation and/or other materials provided with the | 13 // in the documentation and/or other materials provided with the |
(...skipping 13 matching lines...) Expand all Loading... |
27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 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. | 29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 | 30 |
31 // Author: jasonh@google.com (Jason Hsueh) | 31 // Author: jasonh@google.com (Jason Hsueh) |
32 // | 32 // |
33 // This file is used to test a corner case in the CPP implementation where the | 33 // This file is used to test a corner case in the CPP implementation where the |
34 // generated C++ type is available for the extendee, but the extension is | 34 // generated C++ type is available for the extendee, but the extension is |
35 // defined in a file whose C++ type is not in the binary. | 35 // defined in a file whose C++ type is not in the binary. |
36 | 36 |
| 37 syntax = "proto2"; |
37 | 38 |
38 import "google/protobuf/internal/more_extensions.proto"; | 39 import "google/protobuf/internal/more_extensions.proto"; |
39 | 40 |
40 package google.protobuf.internal; | 41 package google.protobuf.internal; |
41 | 42 |
42 message DynamicMessageType { | 43 message DynamicMessageType { |
43 optional int32 a = 1; | 44 optional int32 a = 1; |
44 } | 45 } |
45 | 46 |
46 extend ExtendedMessage { | 47 extend ExtendedMessage { |
47 optional int32 dynamic_int32_extension = 100; | 48 optional int32 dynamic_int32_extension = 100; |
48 optional DynamicMessageType dynamic_message_extension = 101; | 49 optional DynamicMessageType dynamic_message_extension = 101; |
49 } | 50 } |
OLD | NEW |