diff options
author | dmaclach <dmaclach@gmail.com> | 2018-11-13 20:49:19 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-13 20:49:19 -0800 |
commit | 6a5a6d54cc4ffba4660dbd176c1074ed845134ae (patch) | |
tree | ee56e14d4f06d4bef3f9ac606151a3c14684825f | |
parent | 70d01d9ef4a77e1a491a51a3d7ff8645507c39a0 (diff) |
Deprecate GTMFileSystemKqueue. (#204)
You should use libdispatch with a DISPATCH_SOURCE_TYPE_VNODE source.
-rw-r--r-- | Foundation/GTMFileSystemKQueue.h | 1 | ||||
-rw-r--r-- | Foundation/GTMFileSystemKQueue.m | 6 | ||||
-rw-r--r-- | Foundation/GTMFileSystemKQueueTest.m | 6 |
3 files changed, 13 insertions, 0 deletions
diff --git a/Foundation/GTMFileSystemKQueue.h b/Foundation/GTMFileSystemKQueue.h index a829154..96e93b3 100644 --- a/Foundation/GTMFileSystemKQueue.h +++ b/Foundation/GTMFileSystemKQueue.h @@ -45,6 +45,7 @@ typedef unsigned int GTMFileSystemKQueueEvents; // delivery, so keep that in mind when you're using this class. This class // explicitly does not handle arbitrary runloops and threading. // +NS_CLASS_DEPRECATED(10_2, 10_6, 2_0, 4_0, "Use libdispatch with DISPATCH_SOURCE_TYPE_VNODE source.") @interface GTMFileSystemKQueue : NSObject { @private NSString *path_; diff --git a/Foundation/GTMFileSystemKQueue.m b/Foundation/GTMFileSystemKQueue.m index a66dc47..7ed2f4e 100644 --- a/Foundation/GTMFileSystemKQueue.m +++ b/Foundation/GTMFileSystemKQueue.m @@ -96,6 +96,10 @@ static CFSocketRef gRunLoopSocket = NULL; return path_; } +#pragma clang diagnostic push +// Ignore all of the deprecation warnings for GTMFileSystemKQueue +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + // Cribbed from Advanced Mac OS X Programming. static void SocketCallBack(CFSocketRef socketref, CFSocketCallBackType type, CFDataRef address, const void *data, void *info) { @@ -136,6 +140,8 @@ static void SocketCallBack(CFSocketRef socketref, CFSocketCallBackType type, [pool drain]; } +#pragma clang diagnostic pop + // Cribbed from Advanced Mac OS X Programming - (void)addFileDescriptorMonitor:(int)fd { _GTMDevAssert(gRunLoopSocket == NULL, @"socket should be NULL at this point"); diff --git a/Foundation/GTMFileSystemKQueueTest.m b/Foundation/GTMFileSystemKQueueTest.m index 9ffc046..2dad7b7 100644 --- a/Foundation/GTMFileSystemKQueueTest.m +++ b/Foundation/GTMFileSystemKQueueTest.m @@ -20,6 +20,10 @@ #import "GTMFileSystemKQueue.h" +#pragma clang diagnostic push +// Ignore all of the deprecation warnings for GTMFileSystemKQueue +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + // Private methods of GTMFileSystemKQueue we use for some tests @interface GTMFileSystemKQueue (PrivateMethods) - (void)unregisterWithKQueue; @@ -508,3 +512,5 @@ } @end + +#pragma clang diagnostic pop |