Differences From Artifact [ff91f774b0]:
- File
src/OFDictionary.m
— part of check-in
[bff98a6244]
at
2013-04-09 21:37:13
on branch trunk
— Simplify -[OFDictionary all{Keys,Objects}].
This is possible now since +[OFArray arrayWithCapacity:] has been added. (user: js, size: 14158) [annotate] [blame] [check-ins using]
To Artifact [903db74406]:
- File
src/OFDictionary.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: 14161) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
642 643 644 645 646 647 648 | [JSON makeImmutable]; objc_autoreleasePoolPop(pool); return JSON; } | | | 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 | [JSON makeImmutable]; objc_autoreleasePoolPop(pool); return JSON; } - (OFDataArray*)messagePackRepresentation { OFDataArray *data; size_t i, count; void *pool; OFEnumerator *keyEnumerator, *objectEnumerator; id key, object; |
︙ | ︙ | |||
685 686 687 688 689 690 691 | while ((key = [keyEnumerator nextObject]) != nil && (object = [objectEnumerator nextObject]) != nil) { void *pool2 = objc_autoreleasePoolPush(); OFDataArray *child; i++; | | | | 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 | while ((key = [keyEnumerator nextObject]) != nil && (object = [objectEnumerator nextObject]) != nil) { void *pool2 = objc_autoreleasePoolPush(); OFDataArray *child; i++; child = [key messagePackRepresentation]; [data addItems: [child items] count: [child count]]; child = [object messagePackRepresentation]; [data addItems: [child items] count: [child count]]; objc_autoreleasePoolPop(pool2); } assert(i == count); objc_autoreleasePoolPop(pool); return data; } @end |