Overview
Comment: | Nullability fixes for ObjFW runtime |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
5882409fd0bd09e1536199603aad8acb |
User & Date: | js on 2017-10-01 09:54:52 |
Other Links: | manifest | tags |
Context
2017-10-01
| ||
13:43 | More nullability and style fixes check-in: 66c29a31f2 user: js tags: trunk | |
09:54 | Nullability fixes for ObjFW runtime check-in: 5882409fd0 user: js tags: trunk | |
09:28 | Nullability fixes for macOS High Sierra check-in: 166fd50e82 user: js tags: trunk | |
Changes
Modified src/OFIntrospection.m from [494b50aa22] to [b331601cc7].
︙ | |||
146 147 148 149 150 151 152 | 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | - - + + - - + + | @try { _name = [[OFString alloc] initWithUTF8String: property->name]; _attributes = property->attributes | (property->extended_attributes << 8); if (property->getter.name != NULL) |
︙ | |||
387 388 389 390 391 392 393 | 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 | - + | self = [super init]; @try { const char *name = ivar_getName(ivar); if (name != NULL) _name = [[OFString alloc] initWithUTF8String: |
︙ |
Modified src/OFObject.m from [d1b883cd1d] to [b2d94e1a72].
︙ | |||
293 294 295 296 297 298 299 | 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | - - + + + | + (Class)class { return self; } + (OFString *)className { |
︙ | |||
355 356 357 358 359 360 361 | 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 | - + - - + + - + | withMethodFromClass: (Class)class { IMP method = [class methodForSelector: selector]; if (method == NULL) @throw [OFInvalidArgumentException exception]; |
︙ | |||
481 482 483 484 485 486 487 | 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 | - + - - + + + | - init { return self; } - (Class)class { |
︙ | |||
1024 1025 1026 1027 1028 1029 1030 | 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 | - + | - (void *)allocMemoryWithSize: (size_t)size { void *pointer; struct pre_mem *preMem; if OF_UNLIKELY (size == 0) |
︙ |
Modified src/instance.m from [f080731090] to [ba0e2c91f2].
︙ | |||
53 54 55 56 57 58 59 | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | - + | objc_constructInstance(Class cls, void *bytes) { id obj = (id)bytes; if (cls == Nil || bytes == NULL) return nil; |
︙ |
Modified src/runtime/ObjFW-RT.h from [8577ac8d70] to [576d1fa9d6].
︙ | |||
45 46 47 48 49 50 51 | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | - - + + - - + + | # endif #endif #if !__has_feature(objc_arc) && !defined(__unsafe_unretained) # define __unsafe_unretained #endif |
︙ | |||
225 226 227 228 229 230 231 | 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 | - + | SEL _Nonnull); extern bool class_addMethod(Class _Nonnull, SEL _Nonnull, IMP _Nonnull, const char *_Nullable); extern IMP _Nullable class_replaceMethod(Class _Nonnull, SEL _Nonnull, IMP _Nonnull, const char *_Nullable); extern Class _Nullable object_getClass(id _Nullable); extern Class _Nullable object_setClass(id _Nullable, Class _Nonnull); |
︙ |
Modified src/runtime/class.m from [d9200138d3] to [671f7fc3c1].
︙ | |||
865 866 867 868 869 870 871 | 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 | - + | rcls->info &= ~OBJC_CLASS_INFO_SETUP; } void objc_unregister_class(Class cls) { while (cls->subclass_list != NULL && cls->subclass_list[0] != Nil) |
︙ |
Modified src/runtime/protocol.m from [74d4f4e6fc] to [4d79da63d1].
︙ | |||
63 64 65 66 67 68 69 | 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | - + | pl != NULL; pl = pl->next) for (long i = 0; i < pl->count; i++) if (protocol_conformsToProtocol(pl->list[i], p)) return true; objc_global_mutex_lock(); |
︙ |
Modified src/runtime/selector.m from [1deeb73a3c] to [b4ebf0ad92].
︙ | |||
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | 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 | + - + + | } SEL sel_registerName(const char *name) { const struct objc_abi_selector *rsel; struct objc_abi_selector *sel; char *name_copy; objc_global_mutex_lock(); if (selectors != NULL && (rsel = objc_hashtable_get(selectors, name)) != NULL) { objc_global_mutex_unlock(); return (SEL)rsel; } if ((sel = malloc(sizeof(struct objc_abi_selector))) == NULL) OBJC_ERROR("Not enough memory to allocate selector!"); |
︙ |
Modified tests/ForwardingTests.m from [64bebc8dde] to [89ccb0a706].
︙ | |||
69 70 71 72 73 74 75 | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | - - + + | @implementation ForwardingTest + (BOOL)resolveClassMethod: (SEL)selector { forwardings++; if (sel_isEqual(selector, @selector(test))) { |
︙ |