Differences From Artifact [3ddd9aa2f7]:
- File
src/OFArray.m
— part of check-in
[cba771824e]
at
2013-06-19 19:14:11
on branch trunk
— Implement the new MessagePack specification.
No support for extensions yet.
This obsoletes BinaryPack. (user: js, size: 16327) [annotate] [blame] [check-ins using]
To Artifact [1b7e4a8b63]:
- File
src/OFArray.m
— part of check-in
[3d16a30f41]
at
2013-06-22 12:12:36
on branch trunk
— Rework exceptions.
This mostly removes the argument for the class in which the exception
occurred. As backtraces were recently added for all platforms, the
passed class does not give any extra information on where the exception
occurred anymore.This also removes a few other arguments which were not too helpful. In
the past, the idea was to pass as many arguments as possible so that it
is easier to find the origin of the exception. However, as backtraces
are a much better way to find the origin, those are not useful anymore
and just make the exception more cumbersome to use. The rule is now to
only pass arguments that might help in recovering from the exception or
provide information that is otherwise not easily accessible. (user: js, size: 16114) [annotate] [blame] [check-ins using]
︙ | |||
179 180 181 182 183 184 185 | 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | - - + | return [super init]; } - initWithObject: (id)object { if (object == nil) { |
︙ | |||
370 371 372 373 374 375 376 | 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 | - + | - (OFArray*)objectsInRange: (of_range_t)range { OFArray *ret; id *buffer; if (range.length > SIZE_MAX - range.location || range.location + range.length < [self count]) |
︙ | |||
408 409 410 411 412 413 414 | 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 | - + - | void *pool; OFMutableString *ret; id *objects; size_t i, count; IMP append; if (separator == nil) |
︙ | |||
588 589 590 591 592 593 594 | 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 | - + | uint8_t type = 0xDC; uint32_t tmp = OF_BSWAP32_IF_LE((uint32_t)count); [data addItem: &type]; [data addItems: &tmp count: sizeof(tmp)]; } else |
︙ | |||
675 676 677 678 679 680 681 | 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 | - + | - (int)countByEnumeratingWithState: (of_fast_enumeration_state_t*)state objects: (id*)objects count: (int)count { of_range_t range = of_range(state->state, count); if (range.length > SIZE_MAX - range.location) |
︙ | |||
716 717 718 719 720 721 722 | 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 | - + - | #endif - (OFArray*)arrayByAddingObject: (id)object { OFMutableArray *ret; if (object == nil) |
︙ | |||
852 853 854 855 856 857 858 | 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 | - - + - - + | [super dealloc]; } - (id)nextObject { if (mutationsPtr != NULL && *mutationsPtr != mutations) @throw [OFEnumerationMutationException |