From 2c81d3e003efd5b7bdd1428d2dfe73b4230c77f5 Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Wed, 13 Sep 2023 12:49:01 -0400 Subject: [PATCH] Add removeObserver:forKeyPath:context: to implementation --- Headers/Foundation/NSKeyValueObserving.h | 4 ++++ Source/NSKeyValueObserving.m | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/Headers/Foundation/NSKeyValueObserving.h b/Headers/Foundation/NSKeyValueObserving.h index e3568f1063..8b1f4522c8 100644 --- a/Headers/Foundation/NSKeyValueObserving.h +++ b/Headers/Foundation/NSKeyValueObserving.h @@ -138,6 +138,10 @@ GS_EXPORT NSString *const NSKeyValueChangeNotificationIsPriorKey; - (void) removeObserver: (NSObject*)anObserver forKeyPath: (NSString*)aPath; +- (void) removeObserver: (NSObject*)anObserver + forKeyPath: (NSString*)aPath + context: (void*)context; + @end @interface NSArray (NSKeyValueObserverRegistration) diff --git a/Source/NSKeyValueObserving.m b/Source/NSKeyValueObserving.m index 7cf27a3db7..4836e2433f 100644 --- a/Source/NSKeyValueObserving.m +++ b/Source/NSKeyValueObserving.m @@ -1561,6 +1561,12 @@ - (void) removeObserver: (NSObject*)anObserver forKeyPath: (NSString*)aPath [forwarder finalize]; } + +- (void) removeObserver: (NSObject*)anObserver forKeyPath: (NSString*)aPath context: (void*)context +{ + [self removeObserver: anObserver forKeyPath: aPath]; +} + @end /**