Move implementation of new method to correct category

This commit is contained in:
Gregory John Casamento 2023-10-01 01:19:53 -04:00
parent edc15778d2
commit f2e31e0b54
2 changed files with 25 additions and 12 deletions

View file

@ -142,11 +142,6 @@ GS_EXPORT NSString *const NSKeyValueChangeNotificationIsPriorKey;
- (void) removeObserver: (NSObject*)anObserver
forKeyPath: (NSString*)aPath
context: (void *)context;
- (void) removeObserver: (NSObject*)anObserver
fromObjectsAtIndexes: (NSIndexSet *)indexes
forKeyPath: (NSString*)aPath
context: (void *)context;
#endif
@end
@ -162,6 +157,12 @@ GS_EXPORT NSString *const NSKeyValueChangeNotificationIsPriorKey;
fromObjectsAtIndexes: (NSIndexSet*)indexes
forKeyPath: (NSString*)aPath;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_7,GS_API_LATEST)
- (void) removeObserver: (NSObject*)anObserver
fromObjectsAtIndexes: (NSIndexSet *)indexes
forKeyPath: (NSString*)aPath
context: (void *)context;
#endif
@end
/**

View file

@ -1631,13 +1631,6 @@ cifframe_callback(ffi_cif *cif, void *retp, void **args, void *user)
[kvoLock unlock];
}
- (void) removeObserver: (NSObject*)anObserver
fromObjectsAtIndexes: (NSIndexSet *)indexes
forKeyPath: (NSString*)aPath
context: (void *)context
{
}
@end
/**
@ -1701,6 +1694,25 @@ cifframe_callback(ffi_cif *cif, void *retp, void **args, void *user)
}
}
- (void) removeObserver: (NSObject*)anObserver
fromObjectsAtIndexes: (NSIndexSet *)indexes
forKeyPath: (NSString*)aPath
context: (void *)context
{
NSUInteger i = [indexes firstIndex];
while (i != NSNotFound)
{
NSObject *elem = [self objectAtIndex: i];
[elem removeObserver: anObserver
forKeyPath: aPath
context: context];
i = [indexes indexGreaterThanIndex: i];
}
}
@end
/**