Differences From Artifact [860bf1d556]:
- File src/OFNotificationCenter.m — part of check-in [8939cbdb52] at 2023-01-06 09:04:02 on branch trunk — Update copyright (user: js, size: 8193) [annotate] [blame] [check-ins using]
To Artifact [7f71790adf]:
- File
src/OFNotificationCenter.m
— part of check-in
[651875bc1f]
at
2023-01-13 13:11:53
on branch trunk
— OFNotificationCenter: Don't expose internal class
This causes problems with Swift, which silently drops methods that use
types for which it doesn't have an interface. (user: js, size: 8322) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
243 244 245 246 247 248 249 | object: object] autorelease]]; objc_autoreleasePoolPop(pool); } #ifdef OF_HAVE_BLOCKS | < | | | | > > > > > > > | | 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 | object: object] autorelease]]; objc_autoreleasePoolPop(pool); } #ifdef OF_HAVE_BLOCKS - (id)addObserverForName: (OFNotificationName)name object: (id)object usingBlock: (OFNotificationCenterBlock)block { void *pool = objc_autoreleasePoolPush(); OFNotificationCenterHandle *handle = [[[OFNotificationCenterHandle alloc] initWithName: name object: object block: block] autorelease]; [self of_addObserver: handle]; [handle retain]; objc_autoreleasePoolPop(pool); return [handle autorelease]; } #endif - (void)removeObserver: (id)handle_ { OFNotificationCenterHandle *handle; void *pool; if (![handle_ isKindOfClass: [OFNotificationCenterHandle class]]) @throw [OFInvalidArgumentException exception]; handle = handle_; pool = objc_autoreleasePoolPush(); /* {} required to avoid -Wmisleading-indentation false positive. */ if (![handle isKindOfClass: [OFNotificationCenterHandle class]]) { @throw [OFInvalidArgumentException exception]; } #ifdef OF_HAVE_THREADS |
︙ | ︙ |