Differences From Artifact [5fe996c5b2]:
- File src/OFData.m — part of check-in [8939cbdb52] at 2023-01-06 09:04:02 on branch trunk — Update copyright (user: js, size: 14190) [annotate] [blame] [check-ins using]
To Artifact [fedaecf95c]:
- File
src/OFData.m
— part of check-in
[6ce0093f8d]
at
2023-04-10 19:22:32
on branch trunk
— Remove OFSerialization
While the idea sounds nice that the tag name is the class, this means the
serialization includes whether something is mutable or immutable. This means
doing as much as making something immutable changes the serialization, which
can then cause issues after being deserialized. (user: js, size: 13201) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
27 28 29 30 31 32 33 | # import "OFFileManager.h" #endif #import "OFIRI.h" #import "OFIRIHandler.h" #import "OFStream.h" #import "OFString.h" #import "OFSystemInfo.h" | < | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | # import "OFFileManager.h" #endif #import "OFIRI.h" #import "OFIRIHandler.h" #import "OFStream.h" #import "OFString.h" #import "OFSystemInfo.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFNotImplementedException.h" #import "OFOutOfMemoryException.h" #import "OFOutOfRangeException.h" #import "OFTruncatedDataException.h" |
︙ | ︙ | |||
333 334 335 336 337 338 339 | if (!mutable) [(OFMutableData *)self makeImmutable]; return self; } | < < < < < < < < < < < < < < < < < < < < < < < | 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | if (!mutable) [(OFMutableData *)self makeImmutable]; return self; } - (void)dealloc { if (_freeWhenDone) OFFreeMemory(_items); [_parentData release]; |
︙ | ︙ | |||
592 593 594 595 596 597 598 | void *pool = objc_autoreleasePoolPush(); [[OFIRIHandler openItemAtIRI: IRI mode: @"w"] writeData: self]; objc_autoreleasePoolPop(pool); } | < < < < < < < < < < < < < < < < < < < < < < | 568 569 570 571 572 573 574 575 576 577 578 579 580 581 | void *pool = objc_autoreleasePoolPush(); [[OFIRIHandler openItemAtIRI: IRI mode: @"w"] writeData: self]; objc_autoreleasePoolPop(pool); } - (OFData *)messagePackRepresentation { OFMutableData *data; if (_itemSize != 1) @throw [OFNotImplementedException exceptionWithSelector: _cmd object: self]; |
︙ | ︙ |