|
|
@ -54,7 +54,7 @@ static GPBFileDescriptor *GPBTypeRoot_FileDescriptor(void) { |
|
|
|
#pragma mark - Enum GPBSyntax |
|
|
|
#pragma mark - Enum GPBSyntax |
|
|
|
|
|
|
|
|
|
|
|
GPBEnumDescriptor *GPBSyntax_EnumDescriptor(void) { |
|
|
|
GPBEnumDescriptor *GPBSyntax_EnumDescriptor(void) { |
|
|
|
static GPBEnumDescriptor *descriptor = NULL; |
|
|
|
static _Atomic(GPBEnumDescriptor*) descriptor = NULL; |
|
|
|
if (!descriptor) { |
|
|
|
if (!descriptor) { |
|
|
|
static const char *valueNames = |
|
|
|
static const char *valueNames = |
|
|
|
"SyntaxProto2\000SyntaxProto3\000"; |
|
|
|
"SyntaxProto2\000SyntaxProto3\000"; |
|
|
@ -68,7 +68,8 @@ GPBEnumDescriptor *GPBSyntax_EnumDescriptor(void) { |
|
|
|
values:values |
|
|
|
values:values |
|
|
|
count:(uint32_t)(sizeof(values) / sizeof(int32_t)) |
|
|
|
count:(uint32_t)(sizeof(values) / sizeof(int32_t)) |
|
|
|
enumVerifier:GPBSyntax_IsValidValue]; |
|
|
|
enumVerifier:GPBSyntax_IsValidValue]; |
|
|
|
if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) { |
|
|
|
GPBEnumDescriptor *expected = nil; |
|
|
|
|
|
|
|
if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) { |
|
|
|
[worker release]; |
|
|
|
[worker release]; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -368,7 +369,7 @@ void SetGPBField_Cardinality_RawValue(GPBField *message, int32_t value) { |
|
|
|
#pragma mark - Enum GPBField_Kind |
|
|
|
#pragma mark - Enum GPBField_Kind |
|
|
|
|
|
|
|
|
|
|
|
GPBEnumDescriptor *GPBField_Kind_EnumDescriptor(void) { |
|
|
|
GPBEnumDescriptor *GPBField_Kind_EnumDescriptor(void) { |
|
|
|
static GPBEnumDescriptor *descriptor = NULL; |
|
|
|
static _Atomic(GPBEnumDescriptor*) descriptor = NULL; |
|
|
|
if (!descriptor) { |
|
|
|
if (!descriptor) { |
|
|
|
static const char *valueNames = |
|
|
|
static const char *valueNames = |
|
|
|
"TypeUnknown\000TypeDouble\000TypeFloat\000TypeInt" |
|
|
|
"TypeUnknown\000TypeDouble\000TypeFloat\000TypeInt" |
|
|
@ -404,7 +405,8 @@ GPBEnumDescriptor *GPBField_Kind_EnumDescriptor(void) { |
|
|
|
values:values |
|
|
|
values:values |
|
|
|
count:(uint32_t)(sizeof(values) / sizeof(int32_t)) |
|
|
|
count:(uint32_t)(sizeof(values) / sizeof(int32_t)) |
|
|
|
enumVerifier:GPBField_Kind_IsValidValue]; |
|
|
|
enumVerifier:GPBField_Kind_IsValidValue]; |
|
|
|
if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) { |
|
|
|
GPBEnumDescriptor *expected = nil; |
|
|
|
|
|
|
|
if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) { |
|
|
|
[worker release]; |
|
|
|
[worker release]; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -441,7 +443,7 @@ BOOL GPBField_Kind_IsValidValue(int32_t value__) { |
|
|
|
#pragma mark - Enum GPBField_Cardinality |
|
|
|
#pragma mark - Enum GPBField_Cardinality |
|
|
|
|
|
|
|
|
|
|
|
GPBEnumDescriptor *GPBField_Cardinality_EnumDescriptor(void) { |
|
|
|
GPBEnumDescriptor *GPBField_Cardinality_EnumDescriptor(void) { |
|
|
|
static GPBEnumDescriptor *descriptor = NULL; |
|
|
|
static _Atomic(GPBEnumDescriptor*) descriptor = NULL; |
|
|
|
if (!descriptor) { |
|
|
|
if (!descriptor) { |
|
|
|
static const char *valueNames = |
|
|
|
static const char *valueNames = |
|
|
|
"CardinalityUnknown\000CardinalityOptional\000C" |
|
|
|
"CardinalityUnknown\000CardinalityOptional\000C" |
|
|
@ -458,7 +460,8 @@ GPBEnumDescriptor *GPBField_Cardinality_EnumDescriptor(void) { |
|
|
|
values:values |
|
|
|
values:values |
|
|
|
count:(uint32_t)(sizeof(values) / sizeof(int32_t)) |
|
|
|
count:(uint32_t)(sizeof(values) / sizeof(int32_t)) |
|
|
|
enumVerifier:GPBField_Cardinality_IsValidValue]; |
|
|
|
enumVerifier:GPBField_Cardinality_IsValidValue]; |
|
|
|
if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) { |
|
|
|
GPBEnumDescriptor *expected = nil; |
|
|
|
|
|
|
|
if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) { |
|
|
|
[worker release]; |
|
|
|
[worker release]; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|