diff --git a/Source/NSKVOInternal.h b/Source/NSKVOInternal.h index de762d5c0..60b3dd0cf 100644 --- a/Source/NSKVOInternal.h +++ b/Source/NSKVOInternal.h @@ -44,13 +44,15 @@ /* This Key Value Observing Implementation is tied to libobjc2 */ -#import -#import -#import -#import -#import -#import -#import +#import "Foundation/NSObject.h" +#import "Foundation/NSString.h" +#import "Foundation/NSDictionary.h" +#import "Foundation/NSArray.h" +#import "Foundation/NSSet.h" +#import "Foundation/NSKeyValueObserving.h" +#import "Foundation/NSException.h" + +#import "GSPrivate.h" #if defined(__OBJC2__) @@ -114,7 +116,7 @@ // From NSKVOSwizzling void -_NSKVOEnsureKeyWillNotify(id object, NSString *key); +_NSKVOEnsureKeyWillNotify(id object, NSString *key) GS_ATTRIB_PRIVATE; #endif diff --git a/Source/NSKVOSupport.m b/Source/NSKVOSupport.m index 822f3fcc4..2b5f7a381 100644 --- a/Source/NSKVOSupport.m +++ b/Source/NSKVOSupport.m @@ -53,7 +53,7 @@ typedef void (^DispatchChangeBlock)(_NSKVOKeyObserver *); -NSString * +static NSString * _NSKVCSplitKeypath(NSString *keyPath, NSString *__autoreleasing *pRemainder) { NSRange result = [keyPath rangeOfString:@"."]; diff --git a/Source/NSKVOSwizzling.m b/Source/NSKVOSwizzling.m index 41ebd77e1..283721048 100644 --- a/Source/NSKVOSwizzling.m +++ b/Source/NSKVOSwizzling.m @@ -476,7 +476,7 @@ GENERATE_NOTIFYING_SET_IMPL(notifyingSetImplPointer, void *); break; \ } -SEL +static SEL KVCSetterForPropertyName(NSObject *self, const char *key) { SEL sel = nil; @@ -649,7 +649,7 @@ _NSKVOEnsureUnorderedCollectionWillNotify(id object, NSString *key, } } -char * +static char * mutableBufferFromString(NSString *string) { NSUInteger lengthInBytes = [string length] + 1; diff --git a/Source/NSKeyValueCoding+Caching.h b/Source/NSKeyValueCoding+Caching.h index 024197540..aff3455c1 100644 --- a/Source/NSKeyValueCoding+Caching.h +++ b/Source/NSKeyValueCoding+Caching.h @@ -49,6 +49,7 @@ */ #import "Foundation/NSString.h" +#import "GSPrivate.h" id -valueForKeyWithCaching(id obj, NSString *aKey); \ No newline at end of file +valueForKeyWithCaching(id obj, NSString *aKey) GS_ATTRIB_PRIVATE; diff --git a/Source/NSKeyValueCoding+Caching.m b/Source/NSKeyValueCoding+Caching.m index 11643c8fa..6a054d268 100644 --- a/Source/NSKeyValueCoding+Caching.m +++ b/Source/NSKeyValueCoding+Caching.m @@ -426,7 +426,7 @@ _getBoxedBlockForMethod(NSString *key, Method method, SEL sel, uint64_t version) // resolveInstanceMethod:]. // // objc_slot2 has the same struct layout as objc_method. -Method _Nullable _class_getMethodRecursive(Class aClass, SEL aSelector, +static Method _Nullable _class_getMethodRecursive(Class aClass, SEL aSelector, uint64_t *version) { struct objc_slot2 *slot; diff --git a/Source/NSURLSessionTask.m b/Source/NSURLSessionTask.m index 1ca664564..7adc88370 100644 --- a/Source/NSURLSessionTask.m +++ b/Source/NSURLSessionTask.m @@ -303,7 +303,7 @@ progress_callback(void *clientp, curl_off_t dltotal, curl_off_t dlnow, * * libcurl does not unfold HTTP "folded headers" (deprecated since RFC 7230). */ -size_t +static size_t header_callback(char *ptr, size_t size, size_t nitems, void *userdata) { NSURLSessionTask *task; @@ -689,7 +689,7 @@ header_callback(char *ptr, size_t size, size_t nitems, void *userdata) } /* header_callback */ /* CURLOPT_READFUNCTION: read callback for data uploads */ -size_t +static size_t read_callback(char *buffer, size_t size, size_t nitems, void *userdata) { NSURLSession *session;