| 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 // https://developers.google.com/protocol-buffers/ | 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. |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 float valueFloat; | 60 float valueFloat; |
| 61 double valueDouble; | 61 double valueDouble; |
| 62 GPB_UNSAFE_UNRETAINED NSData *valueData; | 62 GPB_UNSAFE_UNRETAINED NSData *valueData; |
| 63 GPB_UNSAFE_UNRETAINED NSString *valueString; | 63 GPB_UNSAFE_UNRETAINED NSString *valueString; |
| 64 GPB_UNSAFE_UNRETAINED GPBMessage *valueMessage; | 64 GPB_UNSAFE_UNRETAINED GPBMessage *valueMessage; |
| 65 int32_t valueEnum; | 65 int32_t valueEnum; |
| 66 } GPBGenericValue; | 66 } GPBGenericValue; |
| 67 | 67 |
| 68 // Do not change the order of this enum (or add things to it) without thinking | 68 // Do not change the order of this enum (or add things to it) without thinking |
| 69 // about it very carefully. There are several things that depend on the order. | 69 // about it very carefully. There are several things that depend on the order. |
| 70 typedef enum { | 70 typedef NS_ENUM(uint8_t, GPBDataType) { |
| 71 GPBDataTypeBool = 0, | 71 GPBDataTypeBool = 0, |
| 72 GPBDataTypeFixed32, | 72 GPBDataTypeFixed32, |
| 73 GPBDataTypeSFixed32, | 73 GPBDataTypeSFixed32, |
| 74 GPBDataTypeFloat, | 74 GPBDataTypeFloat, |
| 75 GPBDataTypeFixed64, | 75 GPBDataTypeFixed64, |
| 76 GPBDataTypeSFixed64, | 76 GPBDataTypeSFixed64, |
| 77 GPBDataTypeDouble, | 77 GPBDataTypeDouble, |
| 78 GPBDataTypeInt32, | 78 GPBDataTypeInt32, |
| 79 GPBDataTypeInt64, | 79 GPBDataTypeInt64, |
| 80 GPBDataTypeSInt32, | 80 GPBDataTypeSInt32, |
| 81 GPBDataTypeSInt64, | 81 GPBDataTypeSInt64, |
| 82 GPBDataTypeUInt32, | 82 GPBDataTypeUInt32, |
| 83 GPBDataTypeUInt64, | 83 GPBDataTypeUInt64, |
| 84 GPBDataTypeBytes, | 84 GPBDataTypeBytes, |
| 85 GPBDataTypeString, | 85 GPBDataTypeString, |
| 86 GPBDataTypeMessage, | 86 GPBDataTypeMessage, |
| 87 GPBDataTypeGroup, | 87 GPBDataTypeGroup, |
| 88 GPBDataTypeEnum, | 88 GPBDataTypeEnum, |
| 89 } GPBDataType; | 89 }; |
| 90 | 90 |
| 91 enum { | 91 enum { |
| 92 // A count of the number of types in GPBDataType. Separated out from the | 92 // A count of the number of types in GPBDataType. Separated out from the |
| 93 // GPBDataType enum to avoid warnings regarding not handling | 93 // GPBDataType enum to avoid warnings regarding not handling |
| 94 // GPBDataType_Count in switch statements. | 94 // GPBDataType_Count in switch statements. |
| 95 GPBDataType_Count = GPBDataTypeEnum + 1 | 95 GPBDataType_Count = GPBDataTypeEnum + 1 |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 // An extension range. | 98 // An extension range. |
| 99 typedef struct GPBExtensionRange { | 99 typedef struct GPBExtensionRange { |
| 100 uint32_t start; // inclusive | 100 uint32_t start; // inclusive |
| 101 uint32_t end; // exclusive | 101 uint32_t end; // exclusive |
| 102 } GPBExtensionRange; | 102 } GPBExtensionRange; |
| OLD | NEW |