38
38
39
39
static const NSUInteger kDefaultRecursionLimit = 64 ;
40
40
41
- static inline void CheckSize (GPBCodedInputStreamState *state, size_t size) {
41
+ static void CheckSize (GPBCodedInputStreamState *state, size_t size) {
42
42
size_t newSize = state->bufferPos + size;
43
43
if (newSize > state->bufferSize ) {
44
44
[NSException raise :NSParseErrorException format: @" " ];
@@ -50,26 +50,26 @@ static inline void CheckSize(GPBCodedInputStreamState *state, size_t size) {
50
50
}
51
51
}
52
52
53
- static inline int8_t ReadRawByte (GPBCodedInputStreamState *state) {
53
+ static int8_t ReadRawByte (GPBCodedInputStreamState *state) {
54
54
CheckSize (state, sizeof (int8_t ));
55
55
return ((int8_t *)state->bytes )[state->bufferPos++];
56
56
}
57
57
58
- static inline int32_t ReadRawLittleEndian32 (GPBCodedInputStreamState *state) {
58
+ static int32_t ReadRawLittleEndian32 (GPBCodedInputStreamState *state) {
59
59
CheckSize (state, sizeof (int32_t ));
60
60
int32_t value = OSReadLittleInt32 (state->bytes , state->bufferPos );
61
61
state->bufferPos += sizeof (int32_t );
62
62
return value;
63
63
}
64
64
65
- static inline int64_t ReadRawLittleEndian64 (GPBCodedInputStreamState *state) {
65
+ static int64_t ReadRawLittleEndian64 (GPBCodedInputStreamState *state) {
66
66
CheckSize (state, sizeof (int64_t ));
67
67
int64_t value = OSReadLittleInt64 (state->bytes , state->bufferPos );
68
68
state->bufferPos += sizeof (int64_t );
69
69
return value;
70
70
}
71
71
72
- static inline int32_t ReadRawVarint32 (GPBCodedInputStreamState *state) {
72
+ static int32_t ReadRawVarint32 (GPBCodedInputStreamState *state) {
73
73
int8_t tmp = ReadRawByte (state);
74
74
if (tmp >= 0 ) {
75
75
return tmp;
@@ -104,7 +104,7 @@ static inline int32_t ReadRawVarint32(GPBCodedInputStreamState *state) {
104
104
return result;
105
105
}
106
106
107
- static inline int64_t ReadRawVarint64 (GPBCodedInputStreamState *state) {
107
+ static int64_t ReadRawVarint64 (GPBCodedInputStreamState *state) {
108
108
int32_t shift = 0 ;
109
109
int64_t result = 0 ;
110
110
while (shift < 64 ) {
@@ -119,7 +119,7 @@ static inline int64_t ReadRawVarint64(GPBCodedInputStreamState *state) {
119
119
return 0 ;
120
120
}
121
121
122
- static inline void SkipRawData (GPBCodedInputStreamState *state, size_t size) {
122
+ static void SkipRawData (GPBCodedInputStreamState *state, size_t size) {
123
123
CheckSize (state, size);
124
124
state->bufferPos += size;
125
125
}
@@ -222,7 +222,7 @@ int32_t GPBCodedInputStreamReadTag(GPBCodedInputStreamState *state) {
222
222
return result;
223
223
}
224
224
225
- NSData *GPBCodedInputStreamReadRetainedData (GPBCodedInputStreamState *state) {
225
+ NSData *GPBCodedInputStreamReadRetainedBytes (GPBCodedInputStreamState *state) {
226
226
int32_t size = ReadRawVarint32 (state);
227
227
if (size < 0 ) return nil ;
228
228
CheckSize (state, size);
@@ -232,7 +232,7 @@ int32_t GPBCodedInputStreamReadTag(GPBCodedInputStreamState *state) {
232
232
return result;
233
233
}
234
234
235
- NSData *GPBCodedInputStreamReadRetainedDataNoCopy (
235
+ NSData *GPBCodedInputStreamReadRetainedBytesNoCopy (
236
236
GPBCodedInputStreamState *state) {
237
237
int32_t size = ReadRawVarint32 (state);
238
238
if (size < 0 ) return nil ;
@@ -453,8 +453,8 @@ - (void)readMapEntry:(id)mapDictionary
453
453
GPBCodedInputStreamPopLimit (&state_, oldLimit);
454
454
}
455
455
456
- - (NSData *)readData {
457
- return [GPBCodedInputStreamReadRetainedData (&state_) autorelease ];
456
+ - (NSData *)readBytes {
457
+ return [GPBCodedInputStreamReadRetainedBytes (&state_) autorelease ];
458
458
}
459
459
460
460
- (uint32_t )readUInt32 {
@@ -499,7 +499,7 @@ @implementation GPBString {
499
499
500
500
// Returns true if the passed in bytes are 7 bit ascii.
501
501
// This routine needs to be fast.
502
- static inline bool AreBytesIn7BitASCII (const uint8_t *bytes, NSUInteger len) {
502
+ static bool AreBytesIn7BitASCII (const uint8_t *bytes, NSUInteger len) {
503
503
// In the loops below, it's more efficient to collect rather than do
504
504
// conditional at every step.
505
505
#if __LP64__
@@ -587,7 +587,7 @@ static inline bool AreBytesIn7BitASCII(const uint8_t *bytes, NSUInteger len) {
587
587
return true ;
588
588
}
589
589
590
- static inline void GPBStringInitStringValue (GPBString *string) {
590
+ static void GPBStringInitStringValue (GPBString *string) {
591
591
OSSpinLockLock (&string->lock_ );
592
592
GPBStringInitStringValueAlreadyLocked (string);
593
593
OSSpinLockUnlock (&string->lock_ );
0 commit comments