|
37 | 37 | #endif |
38 | 38 |
|
39 | 39 | #if DEPLOYMENT_TARGET_WINDOWS |
40 | | -// No C99 support |
41 | | -#define restrict |
42 | 40 |
|
43 | 41 | // Replace bzero |
44 | 42 | #define bzero(dst, size) ZeroMemory(dst, size) |
@@ -244,7 +242,7 @@ static inline void __CFStorageSetChild(CFStorageNode *parentNode, CFIndex childI |
244 | 242 | *((void **)&parentNode->info.notLeaf.child[childIndex]) = newChild; |
245 | 243 | } |
246 | 244 |
|
247 | | -static inline void __CFStorageGetChildren(const CFStorageNode *parent, CFStorageNode ** restrict resultArray, bool shouldRetain, bool shouldFreeze) { |
| 245 | +static inline void __CFStorageGetChildren(const CFStorageNode *parent, CFStorageNode ** _CF_RESTRICT resultArray, bool shouldRetain, bool shouldFreeze) { |
248 | 246 | ASSERT(! parent->isLeaf); |
249 | 247 | CFIndex i; |
250 | 248 | for (i=0; i < 3; i++) { |
@@ -272,7 +270,7 @@ CF_INLINE void __CFStorageSetCache(CFStorageRef storage, CFStorageNode *node, CF |
272 | 270 | /* Gets the location for the specified absolute loc from the cached info. |
273 | 271 | Returns NULL if the location is not in the cache. |
274 | 272 | */ |
275 | | -CF_INLINE uint8_t *__CFStorageGetFromCache(CFStorageRef storage, CFIndex loc, CFRange * restrict validConsecutiveValueRange, bool requireUnfrozenNode) { |
| 273 | +CF_INLINE uint8_t *__CFStorageGetFromCache(CFStorageRef storage, CFIndex loc, CFRange * _CF_RESTRICT validConsecutiveValueRange, bool requireUnfrozenNode) { |
276 | 274 | CFStorageNode * const cachedNode = storage->cacheNode; /* It's important we read from this field no more than once, for thread safety with other concurrent reads; that is why the field is marked volatile. */ |
277 | 275 | if (! cachedNode) return NULL; /* No cache */ |
278 | 276 |
|
@@ -307,7 +305,7 @@ CF_INLINE uint8_t *__CFStorageGetFromCache(CFStorageRef storage, CFIndex loc, CF |
307 | 305 | relativeByteNum (not optional, for performance reasons) returns the relative byte number of the specified byte in the child. |
308 | 306 | Don't call with leaf nodes! |
309 | 307 | */ |
310 | | -CF_INLINE CFStorageNode *__CFStorageFindChild(const CFStorageNode * restrict node, CFIndex byteNum, bool forInsertionOrDeletion, CFIndex * restrict childNum, CFIndex * restrict relativeByteNum) { |
| 308 | +CF_INLINE CFStorageNode *__CFStorageFindChild(const CFStorageNode * _CF_RESTRICT node, CFIndex byteNum, bool forInsertionOrDeletion, CFIndex * _CF_RESTRICT childNum, CFIndex * _CF_RESTRICT relativeByteNum) { |
311 | 309 | if (forInsertionOrDeletion) byteNum--; /* If for insertion, we do <= checks, not <, so this accomplishes the same thing */ |
312 | 310 | CFStorageNode *result; |
313 | 311 | result = node->info.notLeaf.child[0]; |
|
0 commit comments