Differences From Artifact [067d5d407d]:
- File
src/OFBlock.m
— part of check-in
[4e40a57efa]
at
2017-04-02 15:30:03
on branch trunk
— Make __objc_exec_class() take a void*
This is necessary for ObjC++ with GCC, as otherwise, this generates an
error. Since the objc_abi_module struct is private anyway, there is not
much reason to have the argument of that type. (user: js, size: 12431) [annotate] [blame] [check-ins using]
To Artifact [48fc4cece6]:
- File
src/OFBlock.m
— part of check-in
[4af49a13c3]
at
2017-05-07 20:10:13
on branch trunk
— Small code style change
Casts are now written like types in variable declarations. (user: js, size: 12464) [annotate] [blame] [check-ins using]
︙ | |||
39 40 41 42 43 44 45 | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | - + | typedef struct of_block_byref_t of_block_byref_t; struct of_block_byref_t { Class isa; of_block_byref_t *forwarding; int flags; int size; void (*byref_keep)(void *dest, void *src); |
︙ | |||
67 68 69 70 71 72 73 | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | - - + + - - + + - - + + - - + + | - retain; - (void)release; @end #ifdef OF_OBJFW_RUNTIME /* Begin of ObjC module */ static struct objc_abi_class _NSConcreteStackBlock_metaclass = { |
︙ | |||
110 111 112 113 114 115 116 | 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | - + - + | { &_NSConcreteStackBlock, &_NSConcreteGlobalBlock, &_NSConcreteMallocBlock, NULL } }; static struct objc_abi_module module = { |
︙ | |||
154 155 156 157 158 159 160 | 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | - + - + - + + | #ifndef OF_HAVE_ATOMIC_OPS # define NUM_SPINLOCKS 8 /* needs to be a power of 2 */ # define SPINLOCK_HASH(p) ((uintptr_t)p >> 4) & (NUM_SPINLOCKS - 1) static of_spinlock_t blockSpinlocks[NUM_SPINLOCKS]; static of_spinlock_t byrefSpinlocks[NUM_SPINLOCKS]; #endif |
︙ | |||
196 197 198 199 200 201 202 | 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | - + | return block; } void _Block_release(const void *block_) { |
︙ | |||
237 238 239 240 241 242 243 | 238 239 240 241 242 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 | - + - + - - + + - + - + | OF_BLOCK_FIELD_IS_OBJECT | OF_BLOCK_FIELD_IS_BYREF); if (src_ == NULL) return; switch (flags) { case OF_BLOCK_FIELD_IS_BLOCK: |
︙ | |||
321 322 323 324 325 326 327 | 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | - + | _Block_release(obj_); break; case OF_BLOCK_FIELD_IS_OBJECT: if (!(flags_ & OF_BLOCK_BYREF_CALLER)) [(id)obj_ release]; break; case OF_BLOCK_FIELD_IS_BYREF:; |
︙ | |||
430 431 432 433 434 435 436 | 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 | - + + + + + + + - - + + - - + + + - - - - - - - - + | } - init { OF_INVALID_INIT_METHOD } |
︙ | |||
483 484 485 486 487 488 489 | 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 | - + | return self; } - (unsigned int)retainCount { if (object_getClass(self) == (Class)&_NSConcreteMallocBlock) |
︙ |