Overview
Comment: | OFNotificationCenter: Don't expose internal class
This causes problems with Swift, which silently drops methods that use |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
651875bc1f224956a96978feeec292a2 |
User & Date: | js on 2023-01-13 13:11:53 |
Other Links: | manifest | tags |
Context
2023-01-13
| ||
13:31 | OFNotificationCenter: Don't retain observer check-in: 5b5c12fa0b user: js tags: trunk | |
13:11 | OFNotificationCenter: Don't expose internal class check-in: 651875bc1f user: js tags: trunk | |
13:00 | OFString: Remove OF_RETURNS_INNER_POINTER check-in: c8e1b0c2b9 user: js tags: trunk | |
Changes
Modified src/OFNotificationCenter.h from [52d634839c] to [86c8ff2ef9].
︙ | |||
18 19 20 21 22 23 24 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | - | OF_ASSUME_NONNULL_BEGIN @class OFMutableDictionary OF_GENERIC(KeyType, ObjectType); #ifdef OF_HAVE_THREADS @class OFMutex; #endif |
︙ | |||
60 61 62 63 64 65 66 | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | - - + + | + (OFNotificationCenter *)defaultCenter; /** * @brief Adds an observer for the specified notification and object. * * @param observer The object that should receive notifications * @param selector The selector to call on the observer on notifications. The |
︙ | |||
99 100 101 102 103 104 105 | 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | - - - - + + + - + | * @param name The name of the notification to observe * @param object The object that should be sending the notification, or `nil` * if the object should be ignored to determine what * notifications to deliver * @param block The block to handle notifications * @return An opaque object to remove the observer again */ |
︙ |
Modified src/OFNotificationCenter.m from [860bf1d556] to [7f71790adf].
︙ | |||
243 244 245 246 247 248 249 | 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 |
︙ |
Modified tests/OFNotificationCenterTests.m from [553c5745c1] to [773c0131fc].
︙ | |||
105 106 107 108 109 110 111 | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | - + | TEST(@"-[postNotification:] #3", R([center postNotification: notification]) && test1->_received == 1 && test2->_received == 3 && test3->_received == 0 && test4->_received == 0) #ifdef OF_HAVE_BLOCKS __block bool received = false; |
︙ |