Comment: | Enable -Wnullable-to-nonnull-conversion and adjust |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
2de966031225d50bab6c2dc1a7fa3055 |
User & Date: | js on 2017-09-28 23:02:23 |
Other Links: | manifest | tags |
2017-10-01
| ||
09:28 | Nullability fixes for macOS High Sierra check-in: 166fd50e82 user: js tags: trunk | |
2017-09-28
| ||
23:02 | Enable -Wnullable-to-nonnull-conversion and adjust check-in: 2de9660312 user: js tags: trunk | |
2017-09-27
| ||
22:35 | More nullability fixes check-in: 697e3ecbf7 user: js tags: trunk | |
Modified configure.ac from [8d9285e4df] to [94abb5e481].
︙ | |||
185 186 187 188 189 190 191 192 193 194 195 196 197 198 | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | + + | [OBJCFLAGS="$OBJCFLAGS -Wsemicolon-before-method-body"]) AX_CHECK_COMPILER_FLAGS([-Wobjc-missing-property-synthesis -Werror], [OBJCFLAGS="$OBJCFLAGS -Wobjc-missing-property-synthesis"]) AX_CHECK_COMPILER_FLAGS([-Watomic-properties -Werror], [ OBJCFLAGS="$OBJCFLAGS -Watomic-properties" TESTS_OBJCFLAGS="$TESTS_OBJCFLAGS -Wno-atomic-properties" ]) AX_CHECK_COMPILER_FLAGS([-Wnullable-to-nonnull-conversion -Werror], [OBJCFLAGS="$OBJCFLAGS -Wnullable-to-nonnull-conversion"]) AC_MSG_CHECKING(whether Objective C compiler supports properties) AC_TRY_COMPILE([ #ifdef __has_attribute # if __has_attribute(objc_root_class) __attribute__((__objc_root_class__)) # endif |
︙ |
Modified src/OFApplication.m from [f12746971d] to [031d2d2246].
︙ | |||
95 96 97 98 99 100 101 | 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | - + + | [delegate release]; } #define SIGNAL_HANDLER(sig) \ static void \ handle##sig(int signal) \ { \ |
︙ |
Modified src/OFDate.m from [618922b043] to [fde4276673].
︙ | |||
640 641 642 643 644 645 646 | 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 | - - + + - - + + | } - (OFDate *)earlierDate: (OFDate *)otherDate { if (otherDate == nil) return self; |
︙ |
Modified src/OFDictionary.h from [4699be28c7] to [085a75867d].
︙ | |||
227 228 229 230 231 232 233 | 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | - + - + | /*! * @brief Checks whether the dictionary contains an object equal to the * specified object. * * @param object The object which is checked for being in the dictionary * @return A boolean whether the dictionary contains the specified object */ |
︙ |
Modified src/OFDictionary.m from [bd2dcff559] to [20c3611bfd].
︙ | |||
466 467 468 469 470 471 472 | 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 | - + | #ifdef OF_HAVE_BLOCKS - (void)enumerateKeysAndObjectsUsingBlock: (of_dictionary_enumeration_block_t)block { bool stop = false; for (id key in self) { |
︙ |
Modified src/OFDictionary_hashtable.m from [0f9f60ec04] to [6d5e327cda].
︙ | |||
342 343 344 345 346 347 348 | 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 | - + - + - + | count = [_mapTable count]; keys = [self allocMemoryWithSize: sizeof(*keys) count: count]; @try { void *pool = objc_autoreleasePoolPush(); OFMapTableEnumerator *enumerator; |
︙ | |||
377 378 379 380 381 382 383 | 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 | - + - + - + | count = [_mapTable count]; objects = [self allocMemoryWithSize: sizeof(*objects) count: count]; @try { void *pool = objc_autoreleasePoolPush(); OFMapTableEnumerator *enumerator; |
︙ |
Modified src/OFHMAC.m from [298535fc6e] to [fa6e2e00eb].
︙ | |||
123 124 125 126 127 128 129 | 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | - + - + - + | - (const unsigned char *)digest { if (_outerHash == nil || _innerHash == nil) @throw [OFInvalidArgumentException exception]; if (_calculated) |
︙ |
Modified src/OFHTTPClient.m from [6841c42cc1] to [f0ee0fc898].
︙ | |||
93 94 95 96 97 98 99 | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | - + | path = @"/"; requestString = [OFMutableString stringWithFormat: @"%s %@", of_http_request_method_to_string(method), path]; if ([URL query] != nil) { [requestString appendString: @"?"]; |
︙ |
Modified src/OFHTTPCookie.m from [13073ad757] to [dc41fbd99f].
︙ | |||
401 402 403 404 405 406 407 | 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 | - - + + | OFMutableString *ret = [OFMutableString stringWithFormat: @"%@=%@", _name, _value]; void *pool = objc_autoreleasePoolPush(); [ret appendFormat: @"; Domain=%@; Path=%@", _domain, _path]; if (_expires != nil) |
︙ |
Modified src/OFHTTPServer.m from [1e27dfeb94] to [f5a4b0ce8e].
︙ | |||
721 722 723 724 725 726 727 | 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 | - + | if (_host == nil) @throw [OFInvalidArgumentException exception]; if (_listeningSocket != nil) @throw [OFAlreadyConnectedException exception]; _listeningSocket = [[OFTCPSocket alloc] init]; |
︙ |
Modified src/OFList.h from [ebae885803] to [2bcd2e7a45].
︙ | |||
131 132 133 134 135 136 137 | 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | - + - + | /*! * @brief Checks whether the list contains an object equal to the specified * object. * * @param object The object which is checked for being in the list * @return A boolean whether the list contains the specified object */ |
︙ |
Modified src/OFMapTable.h from [59f43aca32] to [975babca81].
︙ | |||
43 44 45 46 47 48 49 | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | - - + + - + + | * @brief A block for enumerating an OFMapTable. * * @param key The current key * @param object The current object * @param stop A pointer to a variable that can be set to true to stop the * enumeration */ |
︙ | |||
157 158 159 160 161 162 163 | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | - - + + - + | /*! * @brief Sets an object for a key. * * @param key The key to set * @param object The object to set the key to */ |
︙ | |||
244 245 246 247 248 249 250 | 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 | - + + - + - - + + | unsigned long *_Nullable _mutationsPtr; uint32_t _position; } - init OF_UNAVAILABLE; /*! |
Modified src/OFMapTable.m from [9a08c57256] to [73724a7b07].
︙ | |||
685 686 687 688 689 690 691 | 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 | - + - + - + - + - + | - (void)dealloc { [_mapTable release]; [super dealloc]; } |
︙ | |||
756 757 758 759 760 761 762 | 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 | - + - + + + + - + | [_object release]; [super dealloc]; } - (id)nextObject { |
Modified src/OFMutableString_UTF8.m from [4a3385c744] to [fc29ab31f7].
︙ | |||
209 210 211 212 213 214 215 | 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | - + | @throw [OFInvalidEncodingException exception]; _s->hashed = false; if (lenNew == (size_t)lenOld) memcpy(_s->cString + index, buffer, lenNew); else if (lenNew > (size_t)lenOld) { |
︙ | |||
238 239 240 241 242 243 244 | 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | - + | _s->cStringLength += lenNew; _s->cString[_s->cStringLength] = '\0'; if (character >= 0x80) _s->isUTF8 = true; @try { |
︙ | |||
267 268 269 270 271 272 273 | 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 | - + | _s->isUTF8 = true; break; case -1: @throw [OFInvalidEncodingException exception]; } _s->hashed = false; |
︙ | |||
297 298 299 300 301 302 303 | 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | - + | _s->isUTF8 = true; break; case -1: @throw [OFInvalidEncodingException exception]; } _s->hashed = false; |
︙ | |||
345 346 347 348 349 350 351 | 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 | - + | if (string == nil) @throw [OFInvalidArgumentException exception]; UTF8StringLength = [string UTF8StringLength]; _s->hashed = false; |
︙ | |||
390 391 392 393 394 395 396 | 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 | + - + | j += len; } tmp[j] = '\0'; _s->hashed = false; _s->cString = (void *)[self |
︙ | |||
519 520 521 522 523 524 525 | 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 | - + | if (_s->isUTF8) index = of_string_utf8_get_position(_s->cString, index, _s->cStringLength); newCStringLength = _s->cStringLength + [string UTF8StringLength]; _s->hashed = false; |
︙ | |||
562 563 564 565 566 567 568 | 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 | + - + | _s->cStringLength - end); _s->hashed = false; _s->length -= range.length; _s->cStringLength -= end - start; _s->cString[_s->cStringLength] = 0; @try { _s->cString = (void *)[self |
︙ | |||
604 605 606 607 608 609 610 | 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 | - + - + | * memmove() the rest of the string to the end. * * We must not resize the string if the new string is smaller, because * then we can't memmove() the rest of the string forward as the rest is * lost due to the resize! */ if (newCStringLength > _s->cStringLength) |
︙ | |||
735 736 737 738 739 740 741 | 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 | + - + | _s->cStringLength -= i; _s->length -= i; memmove(_s->cString, _s->cString + i, _s->cStringLength); _s->cString[_s->cStringLength] = '\0'; @try { _s->cString = (void *)[self |
︙ | |||
762 763 764 765 766 767 768 | 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 | + - + | d++; } _s->cStringLength -= d; _s->length -= d; @try { _s->cString = (void *)[self |
︙ | |||
799 800 801 802 803 804 805 | 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 | + - + | _s->cStringLength -= i; _s->length -= i; memmove(_s->cString, _s->cString + i, _s->cStringLength); _s->cString[_s->cStringLength] = '\0'; @try { _s->cString = (void *)[self |
Modified src/OFObject.h from [09a592a800] to [8cde88e60d].
︙ | |||
673 674 675 676 677 678 679 | 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 | - + - + | * * It will be freed automatically when the object is deallocated. * * @param size The size of the memory to allocate * @return A pointer to the allocated memory. May return NULL if the specified * size is 0. */ |
︙ |
Modified src/OFOptionsParser.m from [f1e270d342] to [77a19bfe68].
︙ | |||
103 104 105 106 107 108 109 | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | - + + + - + | if (iter->longOption != nil) { @try { iter2->longOption = [iter->longOption copy]; if ([_longOptions objectForKey: |
︙ | |||
205 206 207 208 209 210 211 | 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | - + + | pos = [argument length]; _lastLongOption = [[argument substringWithRange: of_range(2, pos - 2)] copy]; objc_autoreleasePoolPop(pool); |
︙ |
Modified src/OFSet.h from [c9d70b7eb7] to [968a9faa33].
︙ | |||
211 212 213 214 215 216 217 | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | - + | /*! * @brief Checks whether the set contains an object equal to the specified * object. * * @param object The object which is checked for being in the set * @return A boolean whether the set contains the specified object */ |
︙ |
Modified src/OFSet_hashtable.m from [84c4225949] to [dab1aab8a3].
︙ | |||
253 254 255 256 257 258 259 260 261 | 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 | + - - + + + + + + + + | return [set->_mapTable isEqual: _mapTable]; } - (id)anyObject { void *pool = objc_autoreleasePoolPush(); void **objectPtr; id object; |
︙ |
Modified src/OFStream.m from [815f2dd728] to [9e8fe0a5ac].
︙ | |||
657 658 659 660 661 662 663 | 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 | - + + | if OF_UNLIKELY (_readBuffer[i] == '\n' || _readBuffer[i] == '\0') { retLength = i; if (i > 0 && _readBuffer[i - 1] == '\r') retLength--; |
︙ | |||
686 687 688 689 690 691 692 | 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 | - + | } retLength = _readBufferLength; if (retLength > 0 && _readBuffer[retLength - 1] == '\r') retLength--; |
︙ | |||
881 882 883 884 885 886 887 | 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 | - + | j = 0; if (j == delimiterLength || _readBuffer[i] == '\0') { if (_readBuffer[i] == '\0') delimiterLength = 1; ret = [OFString |
︙ | |||
905 906 907 908 909 910 911 | 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 | - + | @try { if ([self lowlevelIsAtEndOfStream]) { if (_readBuffer == NULL) { _waitingForDelimiter = false; return nil; } |
︙ | |||
1035 1036 1037 1038 1039 1040 1041 | 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 | - + | } - (void)flushWriteBuffer { if (_writeBuffer == NULL) return; |
︙ |
Modified src/OFString_UTF8.m from [62af83b584] to [c4bb148231].
︙ | |||
175 176 177 178 179 180 181 | 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | - + | - init { self = [super init]; @try { _s = &_storage; |
︙ | |||
241 242 243 244 245 246 247 | 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | + - + | memcmp(cString, "\xEF\xBB\xBF", 3) == 0) { cString += 3; cStringLength -= 3; } _s = &_storage; _s->cString = (void *)[self |
︙ | |||
288 289 290 291 292 293 294 | 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | - + | (uint8_t)cString[i], buffer); if (bytes == 0) @throw [OFInvalidEncodingException exception]; _s->cStringLength += bytes - 1; |
︙ | |||
369 370 371 372 373 374 375 | 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 | - + | _s->isUTF8 = true; byteLength = of_string_utf8_encode(unichar, buffer); if (byteLength == 0) @throw [OFInvalidEncodingException exception]; _s->cStringLength += byteLength - 1; |
︙ | |||
441 442 443 444 445 446 447 | 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 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 | + - + + - + - + | [string isKindOfClass: [OFMutableString_UTF8 class]]) _s->isUTF8 = ((OFString_UTF8 *)string)->_s->isUTF8; else _s->isUTF8 = true; _s->length = [string length]; _s->cString = (void *)[self |
︙ | |||
517 518 519 520 521 522 523 | 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 | + - + | string++; length--; } else if (byteOrder != OF_BYTE_ORDER_NATIVE) swap = true; _s = &_storage; _s->cString = (void *)[self |
︙ | |||
567 568 569 570 571 572 573 | 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 | - + | j += len; } _s->cString[j] = '\0'; _s->cStringLength = j; @try { |
︙ | |||
602 603 604 605 606 607 608 | 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 | + - + | characters++; length--; } else if (byteOrder != OF_BYTE_ORDER_NATIVE) swap = true; _s = &_storage; _s->cString = (void *)[self |
︙ | |||
634 635 636 637 638 639 640 | 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 | - + | } } _s->cString[j] = '\0'; _s->cStringLength = j; @try { |
︙ | |||
677 678 679 680 681 682 683 | 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 | - + | case 1: _s->isUTF8 = true; break; case -1: @throw [OFInvalidEncodingException exception]; } |
︙ |
Modified src/OFTCPSocket.m from [bfcab86676] to [736afef818].
︙ | |||
261 262 263 264 265 266 267 | 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | - + | int errNo = 0; if (_socket != INVALID_SOCKET) @throw [OFAlreadyConnectedException exceptionWithSocket: self]; if (_SOCKS5Host != nil) { /* Connect to the SOCKS5 proxy instead */ |
︙ | |||
603 604 605 606 607 608 609 | 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 | - + + | if (_socket == INVALID_SOCKET) @throw [OFNotOpenException exceptionWithObject: self]; if (_address == NULL) @throw [OFInvalidArgumentException exception]; |
︙ |
Modified src/OFTarArchive.m from [f74f1d447e] to [0808282283].
︙ | |||
204 205 206 207 208 209 210 | 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | + + + - + | } - (OFStream *)streamForReadingCurrentEntry { if (_mode != OF_TAR_ARCHIVE_MODE_READ) @throw [OFInvalidArgumentException exception]; if (_lastReturnedStream == nil) @throw [OFInvalidArgumentException exception]; |
︙ | |||
229 230 231 232 233 234 235 | 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | - + | _lastReturnedStream = [[OFTarArchive_FileWriteStream alloc] initWithStream: _stream entry: entry]; objc_autoreleasePoolPop(pool); |
︙ |
Modified src/OFThread.m from [c1e478224c] to [488341d5ad].
︙ | |||
383 384 385 386 387 388 389 | 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 | - + | # else @synchronized (self) { if (_runLoop == nil) _runLoop = [[OFRunLoop alloc] init]; } # endif |
︙ |
Modified src/OFXMLAttribute.m from [464c2003f8] to [292617ba84].
︙ | |||
161 162 163 164 165 166 167 | 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | - + | namespace: OF_SERIALIZATION_NS]; [element addAttributeWithName: @"name" stringValue: _name]; if (_namespace != nil) [element addAttributeWithName: @"namespace" |
︙ |
Modified src/OFXMLElement.m from [28440d417d] to [8c36bd33b3].
︙ | |||
172 173 174 175 176 177 178 | 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | - + | _namespaces = [[OFMutableDictionary alloc] initWithKeysAndObjects: @"http://www.w3.org/XML/1998/namespace", @"xml", @"http://www.w3.org/2000/xmlns/", @"xmlns", nil]; if (stringValue != nil) |
︙ | |||
434 435 436 437 438 439 440 | 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 | - + - + | OFString *ret; OFString *defaultNS; pool = objc_autoreleasePoolPush(); parentPrefix = [allNamespaces objectForKey: (parent != nil && parent->_namespace != nil |
︙ | |||
523 524 525 526 527 528 529 | 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 | - + - + + | void *pool2 = objc_autoreleasePoolPush(); OFString *attributeName = [attribute name]; OFString *attributePrefix = nil; OFString *tmp = [[attribute stringValue] stringByXMLEscaping]; if ([attribute namespace] != nil && (attributePrefix = [allNamespaces objectForKey: |
︙ | |||
699 700 701 702 703 704 705 | 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 | - + - + - + | if (_name != nil) [element addAttributeWithName: @"name" stringValue: _name]; if (_namespace != nil) [element addAttributeWithName: @"namespace" |
︙ | |||
742 743 744 745 746 747 748 | 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 | - + + | if (_children != nil) { OFXMLElement *childrenElement; childrenElement = [OFXMLElement elementWithName: @"children" namespace: OF_SERIALIZATION_NS]; |
︙ |
Modified src/OFXMLElementBuilder.m from [8f1f7d2342] to [112bbd4243].
︙ | |||
113 114 115 116 117 118 119 | 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | + - + | namespace: namespace]; else @throw [OFMalformedXMLException exception]; return; case 1: [_delegate elementBuilder: self didBuildElement: (OFXMLElement *) |
︙ |
Modified src/OFXMLParser.m from [913f851c54] to [8522ee412a].
︙ | |||
543 544 545 546 547 548 549 | 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 | - + - + - + | if (_data[_i] == '>' || _data[_i] == '/') { OFString *namespace; namespace = namespaceForPrefix(_prefix, _namespaces); if (_prefix != nil && namespace == nil) @throw [OFUnboundPrefixException |
︙ | |||
630 631 632 633 634 635 636 | 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 | - + + - + | [_previous removeLastObject]; [_buffer removeAllItems]; namespace = namespaceForPrefix(_prefix, _namespaces); if (_prefix != nil && namespace == nil) |
︙ | |||
681 682 683 684 685 686 687 | 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 | - + + - + - + - + | attributesObjects = [_attributes objects]; attributesCount = [_attributes count]; namespace = namespaceForPrefix(_prefix, _namespaces); if (_prefix != nil && namespace == nil) |
︙ | |||
826 827 828 829 830 831 832 | 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 | - - + + + - + | pool = objc_autoreleasePoolPush(); attributeValue = transformString(self, _buffer, 0, true); if (_attributePrefix == nil && [_attributeName isEqual: @"xmlns"]) [[_namespaces lastObject] setObject: attributeValue forKey: @""]; if ([_attributePrefix isEqual: @"xmlns"]) |
︙ |
Modified src/OFZIPArchive.m from [700f57a4db] to [0736b3b069].
︙ | |||
463 464 465 466 467 468 469 | 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 | - + | _lastReturnedStream = [[OFZIPArchive_FileReadStream alloc] initWithStream: _stream entry: entry]; objc_autoreleasePoolPop(pool); |
︙ | |||
554 555 556 557 558 559 560 | 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 | - + | _lastReturnedStream = [[OFZIPArchive_FileWriteStream alloc] initWithStream: _stream entry: entry]; objc_autoreleasePoolPop(pool); |
︙ | |||
601 602 603 604 605 606 607 | 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 | - + | [_stream writeLittleEndianInt16: 0xFFFF]; /* CD disk */ [_stream writeLittleEndianInt16: 0xFFFF]; /* CD entries in disk */ [_stream writeLittleEndianInt16: 0xFFFF]; /* CD entries */ [_stream writeLittleEndianInt32: 0xFFFFFFFF]; /* CD size */ [_stream writeLittleEndianInt32: 0xFFFFFFFF]; /* CD offset */ [_stream writeLittleEndianInt16: [_archiveComment UTF8StringLength]]; if (_archiveComment != nil) |
︙ |
Modified src/OFZIPArchiveEntry.m from [c8f541f60e] to [f6ad079c58].
︙ | |||
461 462 463 464 465 466 467 | 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | - + - + | [stream writeLittleEndianInt64: _uncompressedSize]; [stream writeLittleEndianInt64: _compressedSize]; [stream writeLittleEndianInt64: _localFileHeaderOffset]; [stream writeLittleEndianInt32: _startDiskNumber]; size += (2 * 2) + (3 * 8) + 4; if (_extraField != nil) |
Modified src/bridge/NSString+OFObject.m from [02a295e9aa] to [0a0d7245e4].
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 | - + | #import "NSString+OFObject.h" #import "OFString.h" @implementation NSString (OFObject) - (id)OFObject { |
Modified src/bridge/OFString+NSObject.m from [f1289a59f8] to [d89258eedd].
︙ | |||
14 15 16 17 18 19 20 21 22 23 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | + + - - + + + + + + + + | * file. */ #import <Foundation/NSString.h> #import "OFString+NSObject.h" #import "OFInitializationFailedException.h" @implementation OFString (NSObject) - (id)NSObject { |
Modified src/macros.h from [7f6db52639] to [ffa2588354].
︙ | |||
573 574 575 576 577 578 579 | 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 | - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | # define OF_BSWAP_FLOAT_IF_BE(i) (i) # define OF_BSWAP_DOUBLE_IF_BE(i) (i) # define OF_BSWAP_FLOAT_IF_LE(i) OF_BSWAP_FLOAT(i) # define OF_BSWAP_DOUBLE_IF_LE(i) OF_BSWAP_DOUBLE(i) #endif static OF_INLINE uint16_t |
︙ | |||
758 759 760 761 762 763 764 | 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 | - + - + - + - - + + - + | OF_HASH_ADD(hash, (otherCopy >> 24) & 0xFF); \ OF_HASH_ADD(hash, (otherCopy >> 16) & 0xFF); \ OF_HASH_ADD(hash, (otherCopy >> 8) & 0xFF); \ OF_HASH_ADD(hash, otherCopy & 0xFF); \ } static OF_INLINE bool |
︙ |
Modified tests/OFDictionaryTests.m from [76bc88ef2a] to [513f38a1a5].
︙ | |||
234 235 236 237 238 239 240 | 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 | - + | for (OFString *key in mutDict) { if (i > 1 || ![key isEqual: keys[i]]) { ok = false; break; } |
︙ | |||
275 276 277 278 279 280 281 | 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | + - + | ^ (id key, id obj, bool *stop) { if (i > 1 || ![key isEqual: keys[i]]) { ok = false; *stop = true; return; } [mutDict |
︙ |
Modified tests/OFInvocationTests.m from [1bbbdf67b6] to [852b660a9a].
︙ | |||
251 252 253 254 255 256 257 | 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 | - + + | } #endif - (void)invocationTests { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; SEL selector = @selector(invocationTestMethod1::::); |
︙ | |||
309 310 311 312 313 314 315 | 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 | - + - + - + | atIndex: 5]) && memcmp(&st, &st2, sizeof(st)) == 0) #ifdef OF_INVOCATION_CAN_INVOKE /* -[invoke] #1 */ selector = @selector(invocationTestMethod2::::::::::::::::); invocation = [OFInvocation invocationWithMethodSignature: |
︙ | |||
376 377 378 379 380 381 382 383 384 385 386 387 388 389 | 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 | + | R([invocation getReturnValue: &floatResult]) && floatResult == 8.5) /* Only when encoding long doubles is supported */ if (strcmp(@encode(double), @encode(long double)) != 0) { /* -[invoke] #4 */ selector = @selector(invocationTestMethod5::::::::::::::::); invocation = [OFInvocation invocationWithMethodSignature: (OFMethodSignature *) [self methodSignatureForSelector: selector]]; [invocation setArgument: &self atIndex: 0]; [invocation setArgument: &selector atIndex: 1]; |
︙ | |||
399 400 401 402 403 404 405 | 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | - + | longDoubleResult == 8.5) } # ifndef __STDC_NO_COMPLEX__ /* -[invoke] #5 */ selector = @selector(invocationTestMethod6::::::::::::::::); invocation = [OFInvocation invocationWithMethodSignature: |
︙ | |||
429 430 431 432 433 434 435 436 437 438 439 440 441 442 | 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 | + | /* Only when encoding complex long doubles is supported */ if (strcmp(@encode(complex double), @encode(complex long double)) != 0) { /* -[invoke] #6 */ selector = @selector(invocationTestMethod7::::::::::::::::); invocation = [OFInvocation invocationWithMethodSignature: (OFMethodSignature *) [self methodSignatureForSelector: selector]]; [invocation setArgument: &self atIndex: 0]; [invocation setArgument: &selector atIndex: 1]; |
︙ | |||
468 469 470 471 472 473 474 | 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 | - + | } # endif # ifdef __SIZEOF_INT128__ /* -[invoke] #7 */ selector = @selector(invocationTestMethod8::::::::::::::::); invocation = [OFInvocation invocationWithMethodSignature: |
︙ |
Modified tests/OFListTests.m from [3c7e2e133b] to [8387465471].
︙ | |||
56 57 58 59 60 61 62 | 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 83 84 85 86 | - + + - + + - + + - + | TEST(@"-[lastListObject]", [[list lastListObject]->object isEqual: strings[2]]) TEST(@"-[lastListObject]->previous", [[list lastListObject]->previous->object isEqual: strings[1]]) TEST(@"-[removeListObject:]", |
︙ | |||
112 113 114 115 116 117 118 | 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | - + | if ([list count] != i) ok = false; TEST(@"OFEnumerator's -[nextObject]", ok); [enumerator reset]; |
︙ | |||
141 142 143 144 145 146 147 | 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | - + + | TEST(@"Fast Enumeration", ok) ok = false; @try { for (OFString *obj in list) { (void)obj; |