Comment: | Remove OFSerialization
While the idea sounds nice that the tag name is the class, this means the |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
6ce0093f8d6b151bb9b24792974ccd30 |
User & Date: | js on 2023-04-10 19:22:32 |
Other Links: | manifest | tags |
2023-04-11
| ||
18:42 | utils: Fix %c instead of %C for short options check-in: bb4026082a user: js tags: trunk | |
2023-04-10
| ||
19:22 | Remove OFSerialization check-in: 6ce0093f8d user: js tags: trunk | |
18:51 | OFDNSResolver: Rename usesTCP -> forcesTCP check-in: 1e62dc40eb user: js tags: trunk | |
Modified .fossil-settings/clean-glob from [06b87ad48d] to [0ae1b8a1ac].
︙ | ︙ | |||
35 36 37 38 39 40 41 | src/tls/Info.plist tests/DerivedData tests/EBOOT.PBP tests/Info.plist tests/PARAM.SFO tests/objc_sync/objc_sync tests/plugin/Info.plist | < | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | src/tls/Info.plist tests/DerivedData tests/EBOOT.PBP tests/Info.plist tests/PARAM.SFO tests/objc_sync/objc_sync tests/plugin/Info.plist tests/terminal/terminal_tests tests/testfile_bin.m tests/testfile_ini.m tests/tests tests/tests.3dsx tests/tests.arm9 tests/tests.nds |
︙ | ︙ |
Modified .fossil-settings/ignore-glob from [23cb69850b] to [eed8ea3523].
︙ | ︙ | |||
40 41 42 43 44 45 46 | tests/Info.plist tests/PARAM.SFO tests/iOS.xcodeproj/*.pbxuser tests/iOS.xcodeproj/project.xcworkspace tests/iOS.xcodeproj/xcuserdata tests/objc_sync/objc_sync tests/plugin/Info.plist | < | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | tests/Info.plist tests/PARAM.SFO tests/iOS.xcodeproj/*.pbxuser tests/iOS.xcodeproj/project.xcworkspace tests/iOS.xcodeproj/xcuserdata tests/objc_sync/objc_sync tests/plugin/Info.plist tests/terminal/terminal_tests tests/testfile_bin.m tests/testfile_ini.m tests/tests tests/tests.3dsx tests/tests.arm9 tests/tests.nds |
︙ | ︙ |
Modified .gitignore from [726b780402] to [9fa51c850c].
︙ | ︙ | |||
40 41 42 43 44 45 46 | tests/Info.plist tests/PARAM.SFO tests/iOS.xcodeproj/*.pbxuser tests/iOS.xcodeproj/project.xcworkspace tests/iOS.xcodeproj/xcuserdata tests/objc_sync/objc_sync tests/plugin/Info.plist | < | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | tests/Info.plist tests/PARAM.SFO tests/iOS.xcodeproj/*.pbxuser tests/iOS.xcodeproj/project.xcworkspace tests/iOS.xcodeproj/xcuserdata tests/objc_sync/objc_sync tests/plugin/Info.plist tests/terminal/terminal_tests tests/testfile_bin.m tests/testfile_ini.m tests/tests tests/tests.3dsx tests/tests.arm9 tests/tests.nds |
︙ | ︙ |
Modified src/Makefile from [534f043ed9] to [3265595cf5].
︙ | ︙ | |||
56 57 58 59 60 61 62 | OFMutableZIPArchiveEntry.m \ OFNotification.m \ OFNotificationCenter.m \ OFNull.m \ OFNumber.m \ OFObject.m \ OFObject+KeyValueCoding.m \ | < < < < | 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 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | OFMutableZIPArchiveEntry.m \ OFNotification.m \ OFNotificationCenter.m \ OFNull.m \ OFNumber.m \ OFObject.m \ OFObject+KeyValueCoding.m \ OFOnce.m \ OFOptionsParser.m \ OFPBKDF2.m \ OFPair.m \ OFRIPEMD160Hash.m \ OFRunLoop.m \ OFSHA1Hash.m \ OFSHA224Hash.m \ OFSHA224Or256Hash.m \ OFSHA256Hash.m \ OFSHA384Hash.m \ OFSHA384Or512Hash.m \ OFSHA512Hash.m \ OFScrypt.m \ OFSecureData.m \ OFSeekableStream.m \ OFSet.m \ OFSortedList.m \ OFStdIOStream.m \ OFStream.m \ OFString.m \ OFString+CryptographicHashing.m \ OFString+JSONParsing.m \ OFString+PercentEncoding.m \ OFString+PropertyListParsing.m \ OFString+XMLEscaping.m \ OFString+XMLUnescaping.m \ ${OF_SUBPROCESS_M} \ OFSettings.m \ OFSystemInfo.m \ OFTarArchive.m \ OFTarArchiveEntry.m \ OFThread.m \ OFTimer.m \ OFTriple.m \ OFUUID.m \ OFValue.m \ OFXMLAttribute.m \ OFXMLCDATA.m \ OFXMLCharacters.m \ OFXMLComment.m \ OFXMLElement.m \ OFXMLElementBuilder.m \ OFXMLNode.m \ OFXMLParser.m \ OFXMLProcessingInstruction.m \ OFZIPArchive.m \ OFZIPArchiveEntry.m \ ${USE_SRCS_FILES} \ |
︙ | ︙ |
Modified src/OFAdjacentArray.m from [6f7bf1cc03] to [3d57d1e63c].
︙ | ︙ | |||
18 19 20 21 22 23 24 | #include <stdarg.h> #import "OFAdjacentArray.h" #import "OFAdjacentSubarray.h" #import "OFData.h" #import "OFMutableAdjacentArray.h" #import "OFString.h" | < | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include <stdarg.h> #import "OFAdjacentArray.h" #import "OFAdjacentSubarray.h" #import "OFData.h" #import "OFMutableAdjacentArray.h" #import "OFString.h" #import "OFEnumerationMutationException.h" #import "OFInvalidArgumentException.h" #import "OFOutOfRangeException.h" @implementation OFAdjacentArray - (instancetype)init |
︙ | ︙ | |||
146 147 148 149 150 151 152 | for (size_t i = 0; i < count; i++) [objects[i] release]; [self release]; @throw e; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | for (size_t i = 0; i < count; i++) [objects[i] release]; [self release]; @throw e; } return self; } - (size_t)count { return _array.count; } |
︙ | ︙ |
Modified src/OFArray.h from [6026515902] to [3d63ad7d51].
︙ | ︙ | |||
21 22 23 24 25 26 27 | #endif #include <stdarg.h> #import "OFObject.h" #import "OFCollection.h" #import "OFEnumerator.h" | < | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #endif #include <stdarg.h> #import "OFObject.h" #import "OFCollection.h" #import "OFEnumerator.h" #import "OFJSONRepresentation.h" #import "OFMessagePackRepresentation.h" OF_ASSUME_NONNULL_BEGIN /** @file */ |
︙ | ︙ | |||
98 99 100 101 102 103 104 | * @class OFArray OFArray.h ObjFW/OFArray.h * * @brief An abstract class for storing objects in an array. * * @note Subclasses must implement @ref count and @ref objectAtIndex:. */ @interface OFArray OF_GENERIC(ObjectType): OFObject <OFCopying, | | | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | * @class OFArray OFArray.h ObjFW/OFArray.h * * @brief An abstract class for storing objects in an array. * * @note Subclasses must implement @ref count and @ref objectAtIndex:. */ @interface OFArray OF_GENERIC(ObjectType): OFObject <OFCopying, OFMutableCopying, OFCollection, OFJSONRepresentation, OFMessagePackRepresentation> #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) # define ObjectType id #endif /** * @brief The objects of the array as a C array. * |
︙ | ︙ |
Modified src/OFArray.m from [9908191730] to [79e2c56f24].
︙ | ︙ | |||
21 22 23 24 25 26 27 | #import "OFArray.h" #import "OFArray+Private.h" #import "OFAdjacentArray.h" #import "OFData.h" #import "OFNull.h" #import "OFString.h" #import "OFSubarray.h" | < | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #import "OFArray.h" #import "OFArray+Private.h" #import "OFAdjacentArray.h" #import "OFData.h" #import "OFNull.h" #import "OFString.h" #import "OFSubarray.h" #import "OFEnumerationMutationException.h" #import "OFInvalidArgumentException.h" #import "OFOutOfRangeException.h" static struct { Class isa; |
︙ | ︙ | |||
83 84 85 86 87 88 89 | - (instancetype)initWithObjects: (id const *)objects count: (size_t)count { return (id)[[OFAdjacentArray alloc] initWithObjects: objects count: count]; } | < < < < < | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | - (instancetype)initWithObjects: (id const *)objects count: (size_t)count { return (id)[[OFAdjacentArray alloc] initWithObjects: objects count: count]; } - (instancetype)retain { return self; } - (instancetype)autorelease { |
︙ | ︙ | |||
210 211 212 213 214 215 216 | { OF_INVALID_INIT_METHOD } - (instancetype)initWithObjects: (id const *)objects count: (size_t)count { | < < < < < | 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | { OF_INVALID_INIT_METHOD } - (instancetype)initWithObjects: (id const *)objects count: (size_t)count { OF_INVALID_INIT_METHOD } - (size_t)count { OF_UNRECOGNIZED_SELECTOR } |
︙ | ︙ | |||
544 545 546 547 548 549 550 | objc_autoreleasePoolPop(pool); [ret makeImmutable]; return [ret autorelease]; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < | 533 534 535 536 537 538 539 540 541 542 543 544 545 546 | objc_autoreleasePoolPop(pool); [ret makeImmutable]; return [ret autorelease]; } - (OFString *)JSONRepresentation { return [self of_JSONRepresentationWithOptions: 0 depth: 0]; } - (OFString *)JSONRepresentationWithOptions: (OFJSONRepresentationOptions)options |
︙ | ︙ |
Modified src/OFCountedMapTableSet.m from [5a8f5db3ac] to [7a63d8437b].
︙ | ︙ | |||
17 18 19 20 21 22 23 | #import "OFCountedMapTableSet.h" #import "OFArray.h" #import "OFMapTable.h" #import "OFMutableMapTableSet.h" #import "OFString.h" #import "OFXMLAttribute.h" | < | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #import "OFCountedMapTableSet.h" #import "OFArray.h" #import "OFMapTable.h" #import "OFMutableMapTableSet.h" #import "OFString.h" #import "OFXMLAttribute.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFEnumerationMutationException.h" #import "OFOutOfRangeException.h" @implementation OFCountedMapTableSet |
︙ | ︙ | |||
110 111 112 113 114 115 116 | while ((object = va_arg(arguments, id)) != nil) [self addObject: object]; } @catch (id e) { [self release]; @throw e; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | while ((object = va_arg(arguments, id)) != nil) [self addObject: object]; } @catch (id e) { [self release]; @throw e; } return self; } - (size_t)countForObject: (id)object { return (size_t)(uintptr_t)[_mapTable objectForKey: object]; } |
︙ | ︙ |
Modified src/OFCountedSet.m from [39bc22ff53] to [2550c38e59].
︙ | ︙ | |||
17 18 19 20 21 22 23 | #include <stdlib.h> #import "OFCountedSet.h" #import "OFCountedMapTableSet.h" #import "OFNumber.h" #import "OFString.h" | < | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include <stdlib.h> #import "OFCountedSet.h" #import "OFCountedMapTableSet.h" #import "OFNumber.h" #import "OFString.h" static struct { Class isa; } placeholder; @interface OFCountedSetPlaceholder: OFCountedSet @end |
︙ | ︙ | |||
67 68 69 70 71 72 73 | - (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments { return (id)[[OFCountedMapTableSet alloc] initWithObject: firstObject arguments: arguments]; } | < < < < < < | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | - (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments { return (id)[[OFCountedMapTableSet alloc] initWithObject: firstObject arguments: arguments]; } - (instancetype)retain { return self; } - (instancetype)autorelease { |
︙ | ︙ | |||
173 174 175 176 177 178 179 | } - (id)mutableCopy { return [[OFCountedSet alloc] initWithSet: self]; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | } - (id)mutableCopy { return [[OFCountedSet alloc] initWithSet: self]; } #ifdef OF_HAVE_BLOCKS - (void)enumerateObjectsAndCountUsingBlock: (OFCountedSetEnumerationBlock)block { [self enumerateObjectsUsingBlock: ^ (id object, bool *stop) { block(object, [self countForObject: object], stop); }]; } |
︙ | ︙ |
Modified src/OFData.h from [72a15add33] to [c6b9b129b7].
︙ | ︙ | |||
10 11 12 13 14 15 16 | * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" | < | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" #import "OFMessagePackRepresentation.h" /*! @file */ OF_ASSUME_NONNULL_BEGIN @class OFIRI; |
︙ | ︙ | |||
34 35 36 37 38 39 40 | OFDataSearchBackwards = 1 } OFDataSearchOptions; /** * @class OFData OFData.h ObjFW/OFData.h * * @brief A class for storing arbitrary data in an array. | < < < | | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | OFDataSearchBackwards = 1 } OFDataSearchOptions; /** * @class OFData OFData.h ObjFW/OFData.h * * @brief A class for storing arbitrary data in an array. */ @interface OFData: OFObject <OFCopying, OFMutableCopying, OFComparing, OFMessagePackRepresentation> { unsigned char *_Nullable _items; size_t _count, _itemSize; bool _freeWhenDone; @private OFData *_Nullable _parentData; OF_RESERVE_IVARS(OFData, 4) |
︙ | ︙ |
Modified src/OFData.m from [5fe996c5b2] to [fedaecf95c].
︙ | ︙ | |||
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]; |
︙ | ︙ |
Modified src/OFDate.h from [e5b2860c38] to [5d6447d0f7].
︙ | ︙ | |||
11 12 13 14 15 16 17 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" #import "OFMessagePackRepresentation.h" | < | | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" #import "OFMessagePackRepresentation.h" OF_ASSUME_NONNULL_BEGIN @class OFString; @class OFConstantString; /** * @class OFDate OFDate.h ObjFW/OFDate.h * * @brief A class for storing, accessing and comparing dates. */ #ifndef OF_DATE_M OF_SUBCLASSING_RESTRICTED #endif @interface OFDate: OFObject <OFCopying, OFComparing, OFMessagePackRepresentation> { OFTimeInterval _seconds; } #ifdef OF_HAVE_CLASS_PROPERTIES @property (class, readonly, nonatomic) OFDate *distantFuture; |
︙ | ︙ |
Modified src/OFDate.m from [46c76c4869] to [8b8a822187].
︙ | ︙ | |||
30 31 32 33 34 35 36 | #ifdef OF_HAVE_THREADS # import "OFMutex.h" #endif #import "OFStrPTime.h" #import "OFString.h" #import "OFSystemInfo.h" #import "OFXMLAttribute.h" | < | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | #ifdef OF_HAVE_THREADS # import "OFMutex.h" #endif #import "OFStrPTime.h" #import "OFString.h" #import "OFSystemInfo.h" #import "OFXMLAttribute.h" #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFOutOfMemoryException.h" #import "OFOutOfRangeException.h" |
︙ | ︙ | |||
492 493 494 495 496 497 498 | seconds = tmAndTzToTime(&tm, tz); objc_autoreleasePoolPop(pool); return [self initWithTimeIntervalSince1970: seconds]; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 491 492 493 494 495 496 497 498 499 500 501 502 503 504 | seconds = tmAndTzToTime(&tm, tz); objc_autoreleasePoolPop(pool); return [self initWithTimeIntervalSince1970: seconds]; } - (bool)isEqual: (id)object { OFDate *otherDate; if (object == self) return true; |
︙ | ︙ | |||
583 584 585 586 587 588 589 | } - (OFString *)description { return [self dateStringWithFormat: @"%Y-%m-%dT%H:%M:%SZ"]; } | < < < < < < < < < < < < < < < < < < < < | 549 550 551 552 553 554 555 556 557 558 559 560 561 562 | } - (OFString *)description { return [self dateStringWithFormat: @"%Y-%m-%dT%H:%M:%SZ"]; } - (OFData *)messagePackRepresentation { void *pool = objc_autoreleasePoolPush(); OFTimeInterval timeInterval = self.timeIntervalSince1970; int64_t seconds = (int64_t)timeInterval; uint32_t nanoseconds = (uint32_t)((timeInterval - trunc(timeInterval)) * 1000000000); |
︙ | ︙ |
Modified src/OFDictionary.h from [8cc1ad5dd1] to [b2fad599b6].
︙ | ︙ | |||
21 22 23 24 25 26 27 | #endif #include <stdarg.h> #import "OFObject.h" #import "OFCollection.h" #import "OFEnumerator.h" | < | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #endif #include <stdarg.h> #import "OFObject.h" #import "OFCollection.h" #import "OFEnumerator.h" #import "OFJSONRepresentation.h" #import "OFMessagePackRepresentation.h" OF_ASSUME_NONNULL_BEGIN @class OFArray OF_GENERIC(ObjectType); |
︙ | ︙ | |||
73 74 75 76 77 78 79 | * @note Fast enumeration on a dictionary enumerates through the keys of the * dictionary. * * @note Subclasses must implement @ref objectForKey:, @ref count and * @ref keyEnumerator. */ @interface OFDictionary OF_GENERIC(KeyType, ObjectType): OFObject <OFCopying, | | | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | * @note Fast enumeration on a dictionary enumerates through the keys of the * dictionary. * * @note Subclasses must implement @ref objectForKey:, @ref count and * @ref keyEnumerator. */ @interface OFDictionary OF_GENERIC(KeyType, ObjectType): OFObject <OFCopying, OFMutableCopying, OFCollection, OFJSONRepresentation, OFMessagePackRepresentation> #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) # define KeyType id # define ObjectType id #endif /** * @brief An array of all keys. |
︙ | ︙ |
Modified src/OFDictionary.m from [599077ba21] to [12d43fb634].
︙ | ︙ | |||
20 21 22 23 24 25 26 | #import "OFDictionary.h" #import "OFArray.h" #import "OFCharacterSet.h" #import "OFData.h" #import "OFEnumerator.h" #import "OFMapTableDictionary.h" #import "OFString.h" | < | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #import "OFDictionary.h" #import "OFArray.h" #import "OFCharacterSet.h" #import "OFData.h" #import "OFEnumerator.h" #import "OFMapTableDictionary.h" #import "OFString.h" #import "OFInvalidArgumentException.h" #import "OFOutOfRangeException.h" #import "OFUndefinedKeyException.h" static struct { Class isa; |
︙ | ︙ | |||
102 103 104 105 106 107 108 | - (instancetype)initWithKey: (id <OFCopying>)firstKey arguments: (va_list)arguments { return (id)[[OFMapTableDictionary alloc] initWithKey: firstKey arguments: arguments]; } | < < < < < < | 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | - (instancetype)initWithKey: (id <OFCopying>)firstKey arguments: (va_list)arguments { return (id)[[OFMapTableDictionary alloc] initWithKey: firstKey arguments: arguments]; } - (instancetype)retain { return self; } - (instancetype)autorelease { |
︙ | ︙ | |||
259 260 261 262 263 264 265 | va_end(arguments); return ret; } - (instancetype)initWithKey: (id)firstKey arguments: (va_list)arguments { | < < < < < | 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | va_end(arguments); return ret; } - (instancetype)initWithKey: (id)firstKey arguments: (va_list)arguments { OF_INVALID_INIT_METHOD } - (id)objectForKey: (id)key { OF_UNRECOGNIZED_SELECTOR } |
︙ | ︙ | |||
566 567 568 569 570 571 572 | [ret makeImmutable]; objc_autoreleasePoolPop(pool); return ret; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 554 555 556 557 558 559 560 561 562 563 564 565 566 567 | [ret makeImmutable]; objc_autoreleasePoolPop(pool); return ret; } - (OFString *)JSONRepresentation { return [self of_JSONRepresentationWithOptions: 0 depth: 0]; } - (OFString *)JSONRepresentationWithOptions: (OFJSONRepresentationOptions)options |
︙ | ︙ |
Modified src/OFIRI.h from [79cb8c8321] to [659e656a72].
︙ | ︙ | |||
11 12 13 14 15 16 17 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" #import "OFCharacterSet.h" | < | | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" #import "OFCharacterSet.h" OF_ASSUME_NONNULL_BEGIN @class OFArray OF_GENERIC(ObjectType); @class OFDictionary OF_GENERIC(KeyType, ObjectType); @class OFNumber; @class OFPair OF_GENERIC(FirstType, SecondType); @class OFString; /** * @class OFIRI OFIRI.h ObjFW/OFIRI.h * * @brief A class for representing IRIs, URIs, URLs and URNs, for parsing them * as well as accessing parts of them. * * This class follows RFC 3976 and RFC 3987. */ @interface OFIRI: OFObject <OFCopying, OFMutableCopying> { OFString *_scheme; OFString *_Nullable _percentEncodedHost; OFNumber *_Nullable _port; OFString *_Nullable _percentEncodedUser; OFString *_Nullable _percentEncodedPassword; OFString *_percentEncodedPath; |
︙ | ︙ |
Modified src/OFIRI.m from [ee22df9601] to [fdb5d156bf].
︙ | ︙ | |||
25 26 27 28 29 30 31 | # import "OFFileManager.h" # import "OFFileIRIHandler.h" #endif #import "OFNumber.h" #import "OFOnce.h" #import "OFPair.h" #import "OFString.h" | < | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | # import "OFFileManager.h" # import "OFFileIRIHandler.h" #endif #import "OFNumber.h" #import "OFOnce.h" #import "OFPair.h" #import "OFString.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFOutOfMemoryException.h" @interface OFIRIAllowedCharacterSetBase: OFCharacterSet @end |
︙ | ︙ | |||
953 954 955 956 957 958 959 | } - (instancetype)of_init { return [super init]; } | < < < < < < < < < < < < < < < < < < < < < < < | 952 953 954 955 956 957 958 959 960 961 962 963 964 965 | } - (instancetype)of_init { return [super init]; } - (void)dealloc { [_scheme release]; [_percentEncodedHost release]; [_port release]; [_percentEncodedUser release]; [_percentEncodedPassword release]; |
︙ | ︙ | |||
1390 1391 1392 1393 1394 1395 1396 | } - (OFString *)description { return [OFString stringWithFormat: @"<%@: %@>", self.class, self.string]; } | < < < < < < < < < < < < < < < < | 1366 1367 1368 1369 1370 1371 1372 1373 | } - (OFString *)description { return [OFString stringWithFormat: @"<%@: %@>", self.class, self.string]; } @end |
Modified src/OFList.h from [58011ed2c8] to [e9e426b5c4].
︙ | ︙ | |||
12 13 14 15 16 17 18 | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" #import "OFCollection.h" #import "OFEnumerator.h" | < | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" #import "OFCollection.h" #import "OFEnumerator.h" OF_ASSUME_NONNULL_BEGIN /** @file */ /* * Make clang's -Wdocumentation shut about about using @struct on someting it |
︙ | ︙ | |||
77 78 79 80 81 82 83 | #endif /** * @class OFList OFList.h ObjFW/OFList.h * * @brief A class which provides easy to use double-linked lists. */ | | < | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | #endif /** * @class OFList OFList.h ObjFW/OFList.h * * @brief A class which provides easy to use double-linked lists. */ @interface OFList OF_GENERIC(ObjectType): OFObject <OFCopying, OFCollection> #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) # define ObjectType id #endif { OFListItem _Nullable _firstListItem; OFListItem _Nullable _lastListItem; size_t _count; |
︙ | ︙ |
Modified src/OFList.m from [f8495d68a7] to [9b79071582].
︙ | ︙ | |||
15 16 17 18 19 20 21 | #include "config.h" #include <string.h> #import "OFList.h" #import "OFString.h" | < | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #include "config.h" #include <string.h> #import "OFList.h" #import "OFString.h" #import "OFArray.h" #import "OFEnumerationMutationException.h" #import "OFInvalidArgumentException.h" struct _OFListItem { struct _OFListItem *previous, *next; |
︙ | ︙ | |||
65 66 67 68 69 70 71 | @synthesize firstListItem = _firstListItem, lastListItem = _lastListItem; + (instancetype)list { return [[[self alloc] init] autorelease]; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | @synthesize firstListItem = _firstListItem, lastListItem = _lastListItem; + (instancetype)list { return [[[self alloc] init] autorelease]; } - (void)dealloc { OFListItem next; for (OFListItem iter = _firstListItem; iter != NULL; iter = next) { [iter->object release]; next = iter->next; |
︙ | ︙ | |||
369 370 371 372 373 374 375 | [ret appendString: @"\n]"]; [ret makeImmutable]; return ret; } | < < < < < < < < < < < < < < < < < < | 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | [ret appendString: @"\n]"]; [ret makeImmutable]; return ret; } - (int)countByEnumeratingWithState: (OFFastEnumerationState *)state objects: (id *)objects count: (int)count { OFListItem listItem; memcpy(&listItem, state->extra, sizeof(listItem)); |
︙ | ︙ |
Modified src/OFMapTableDictionary.m from [4b446060bf] to [7d4c6241d2].
︙ | ︙ | |||
17 18 19 20 21 22 23 | #import "OFMapTableDictionary.h" #import "OFArray.h" #import "OFMapTable+Private.h" #import "OFMapTable.h" #import "OFMutableMapTableDictionary.h" #import "OFString.h" | < | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #import "OFMapTableDictionary.h" #import "OFArray.h" #import "OFMapTable+Private.h" #import "OFMapTable.h" #import "OFMutableMapTableDictionary.h" #import "OFString.h" #import "OFEnumerationMutationException.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" static void * copy(void *object) |
︙ | ︙ | |||
223 224 225 226 227 228 229 | [_mapTable setObject: object forKey: key]; } } @catch (id e) { [self release]; @throw e; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | [_mapTable setObject: object forKey: key]; } } @catch (id e) { [self release]; @throw e; } return self; } - (void)dealloc { [_mapTable release]; |
︙ | ︙ |
Modified src/OFMapTableSet.m from [bdcf63f37b] to [c087e53711].
︙ | ︙ | |||
18 19 20 21 22 23 24 | #import "OFMapTableSet.h" #import "OFArray.h" #import "OFCountedMapTableSet.h" #import "OFMapTable.h" #import "OFMapTable+Private.h" #import "OFMutableMapTableSet.h" #import "OFString.h" | < | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #import "OFMapTableSet.h" #import "OFArray.h" #import "OFCountedMapTableSet.h" #import "OFMapTable.h" #import "OFMapTable+Private.h" #import "OFMutableMapTableSet.h" #import "OFString.h" #import "OFInvalidArgumentException.h" #import "OFEnumerationMutationException.h" static void * retain(void *object) { |
︙ | ︙ | |||
174 175 176 177 178 179 180 | while ((object = va_arg(arguments, id)) != nil) [_mapTable setObject: (void *)1 forKey: object]; } @catch (id e) { [self release]; @throw e; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | while ((object = va_arg(arguments, id)) != nil) [_mapTable setObject: (void *)1 forKey: object]; } @catch (id e) { [self release]; @throw e; } return self; } - (void)dealloc { [_mapTable release]; |
︙ | ︙ |
Modified src/OFMutableArray.m from [72393f4e8d] to [0c37234313].
︙ | ︙ | |||
120 121 122 123 124 125 126 | - (instancetype)initWithObjects: (id const *)objects count: (size_t)count { return (id)[[OFMutableAdjacentArray alloc] initWithObjects: objects count: count]; } | < < < < < < | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | - (instancetype)initWithObjects: (id const *)objects count: (size_t)count { return (id)[[OFMutableAdjacentArray alloc] initWithObjects: objects count: count]; } - (instancetype)retain { return self; } - (instancetype)autorelease { |
︙ | ︙ |
Modified src/OFMutableDictionary.m from [6575efa5e7] to [4bd030691a].
︙ | ︙ | |||
76 77 78 79 80 81 82 | - (instancetype)initWithKey: (id)firstKey arguments: (va_list)arguments { return (id)[[OFMutableMapTableDictionary alloc] initWithKey: firstKey arguments: arguments]; } | < < < < < < | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | - (instancetype)initWithKey: (id)firstKey arguments: (va_list)arguments { return (id)[[OFMutableMapTableDictionary alloc] initWithKey: firstKey arguments: arguments]; } - (instancetype)initWithCapacity: (size_t)capacity { return (id)[[OFMutableMapTableDictionary alloc] initWithCapacity: capacity]; } - (instancetype)retain |
︙ | ︙ |
Modified src/OFMutableSet.m from [da878db78b] to [f395937f21].
︙ | ︙ | |||
65 66 67 68 69 70 71 | - (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments { return (id)[[OFMutableMapTableSet alloc] initWithObject: firstObject arguments: arguments]; } | < < < < < < | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | - (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments { return (id)[[OFMutableMapTableSet alloc] initWithObject: firstObject arguments: arguments]; } - (instancetype)initWithCapacity: (size_t)capacity { return (id)[[OFMutableMapTableSet alloc] initWithCapacity: capacity]; } - (instancetype)retain { |
︙ | ︙ |
Modified src/OFMutableString.m from [de2a5d81a3] to [6babdf726b].
︙ | ︙ | |||
183 184 185 186 187 188 189 | encoding: (OFStringEncoding)encoding { return (id)[[OFMutableUTF8String alloc] initWithContentsOfIRI: IRI encoding: encoding]; } | < < < < < | 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | encoding: (OFStringEncoding)encoding { return (id)[[OFMutableUTF8String alloc] initWithContentsOfIRI: IRI encoding: encoding]; } - (instancetype)retain { return self; } - (instancetype)autorelease { |
︙ | ︙ |
Modified src/OFNull.h from [cb7890ed23] to [08105d85ed].
︙ | ︙ | |||
12 13 14 15 16 17 18 | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" #import "OFJSONRepresentation.h" #import "OFMessagePackRepresentation.h" | < | | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" #import "OFJSONRepresentation.h" #import "OFMessagePackRepresentation.h" OF_ASSUME_NONNULL_BEGIN /** * @class OFNull OFNull.h ObjFW/OFNull.h * * @brief A class for representing null values in collections. */ OF_SUBCLASSING_RESTRICTED @interface OFNull: OFObject <OFCopying, OFJSONRepresentation, OFMessagePackRepresentation> /** * @brief Returns an OFNull singleton. * * @return An OFNull singleton */ + (OFNull *)null; @end OF_ASSUME_NONNULL_END |
Modified src/OFNull.m from [e3e5d7be35] to [820a727986].
︙ | ︙ | |||
12 13 14 15 16 17 18 | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #import "OFNull.h" | | < | | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #import "OFNull.h" #import "OFData.h" #import "OFString.h" #import "OFInvalidArgumentException.h" @interface OFNull () - (OFString *) of_JSONRepresentationWithOptions: (OFJSONRepresentationOptions)options depth: (size_t)depth; |
︙ | ︙ | |||
37 38 39 40 41 42 43 | } + (OFNull *)null { return null; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | } + (OFNull *)null { return null; } - (OFString *)description { return @"<null>"; } - (id)copy { return self; } - (OFString *)JSONRepresentation { return [self of_JSONRepresentationWithOptions: 0 depth: 0]; } - (OFString *)JSONRepresentationWithOptions: (OFJSONRepresentationOptions)options |
︙ | ︙ |
Modified src/OFNumber.h from [7dac2a8920] to [bb1eda01eb].
︙ | ︙ | |||
24 25 26 27 28 29 30 | #ifdef OF_HAVE_SYS_TYPES_H # include <sys/types.h> #endif #import "OFJSONRepresentation.h" #import "OFMessagePackRepresentation.h" | < | | | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | #ifdef OF_HAVE_SYS_TYPES_H # include <sys/types.h> #endif #import "OFJSONRepresentation.h" #import "OFMessagePackRepresentation.h" #import "OFValue.h" OF_ASSUME_NONNULL_BEGIN /** @file */ /** * @class OFNumber OFNumber.h ObjFW/OFNumber.h * * @brief Provides a way to store a number in an object. */ #ifndef OF_NUMBER_M OF_SUBCLASSING_RESTRICTED #endif @interface OFNumber: OFValue <OFComparing, OFJSONRepresentation, OFMessagePackRepresentation> { union { double float_; long long signed_; unsigned long long unsigned_; } _value; const char *_typeEncoding; |
︙ | ︙ |
Modified src/OFNumber.m from [7ed514fdca] to [b9b4334494].
︙ | ︙ | |||
16 17 18 19 20 21 22 | #define OF_NUMBER_M #include "config.h" #include <math.h> #import "OFNumber.h" | | < < | | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #define OF_NUMBER_M #include "config.h" #include <math.h> #import "OFNumber.h" #import "OFData.h" #import "OFString.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFOutOfRangeException.h" @interface OFNumber () + (instancetype)of_alloc; |
︙ | ︙ | |||
373 374 375 376 377 378 379 | static OFOnceControl onceControl = OFOnceControlInitValue; OFOnce(&onceControl, doubleZeroNumberInit); return (id)doubleZeroNumber; } return (id)[[OFNumber of_alloc] initWithDouble: value]; } | < < < < < | 371 372 373 374 375 376 377 378 379 380 381 382 383 384 | static OFOnceControl onceControl = OFOnceControlInitValue; OFOnce(&onceControl, doubleZeroNumberInit); return (id)doubleZeroNumber; } return (id)[[OFNumber of_alloc] initWithDouble: value]; } #ifdef __clang__ # pragma clang diagnostic pop #endif @end @implementation OFNumberSingleton - (instancetype)autorelease |
︙ | ︙ | |||
780 781 782 783 784 785 786 | _value.float_ = value; _typeEncoding = @encode(double); return self; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 773 774 775 776 777 778 779 780 781 782 783 784 785 786 | _value.float_ = value; _typeEncoding = @encode(double); return self; } - (const char *)objCType { return _typeEncoding; } - (void)getValue: (void *)value size: (size_t)size { |
︙ | ︙ | |||
1075 1076 1077 1078 1079 1080 1081 | if (isUnsigned(self)) return [OFString stringWithFormat: @"%llu", self.unsignedLongLongValue]; @throw [OFInvalidFormatException exception]; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 | if (isUnsigned(self)) return [OFString stringWithFormat: @"%llu", self.unsignedLongLongValue]; @throw [OFInvalidFormatException exception]; } - (OFString *)JSONRepresentation { return [self of_JSONRepresentationWithOptions: 0 depth: 0]; } - (OFString *)JSONRepresentationWithOptions: (OFJSONRepresentationOptions)options |
︙ | ︙ |
Deleted src/OFObject+Serialization.h version [5e089b5333].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted src/OFObject+Serialization.m version [da843a6733].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Modified src/OFObject.h from [38cdbbc21b] to [3ddfbc785d].
︙ | ︙ | |||
1512 1513 1514 1515 1516 1517 1518 | OF_ASSUME_NONNULL_END #include "OFBlock.h" #ifdef __OBJC__ # import "OFObject+KeyValueCoding.h" | < | 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 | OF_ASSUME_NONNULL_END #include "OFBlock.h" #ifdef __OBJC__ # import "OFObject+KeyValueCoding.h" #endif #endif |
Modified src/OFObject.m from [d0e1cba71d] to [6fb92dcbb6].
︙ | ︙ | |||
383 384 385 386 387 388 389 | } /* References for static linking */ void _references_to_categories_of_OFObject(void) { _OFObject_KeyValueCoding_reference = 1; | < | 383 384 385 386 387 388 389 390 391 392 393 394 395 396 | } /* References for static linking */ void _references_to_categories_of_OFObject(void) { _OFObject_KeyValueCoding_reference = 1; } @implementation OFObject + (void)load { #if !defined(OF_APPLE_RUNTIME) || defined(__OBJC2__) objc_setUncaughtExceptionHandler(uncaughtExceptionHandler); |
︙ | ︙ |
Modified src/OFSecureData.h from [7365f05648] to [5deb9cb9cd].
︙ | ︙ | |||
149 150 151 152 153 154 155 | freeWhenDone: (bool)freeWhenDone OF_UNAVAILABLE; #ifdef OF_HAVE_FILES - (instancetype)initWithContentsOfFile: (OFString *)path OF_UNAVAILABLE; #endif - (instancetype)initWithContentsOfIRI: (OFIRI *)IRI OF_UNAVAILABLE; - (instancetype)initWithStringRepresentation: (OFString *)string OF_UNAVAILABLE; - (instancetype)initWithBase64EncodedString: (OFString *)string OF_UNAVAILABLE; | < | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | freeWhenDone: (bool)freeWhenDone OF_UNAVAILABLE; #ifdef OF_HAVE_FILES - (instancetype)initWithContentsOfFile: (OFString *)path OF_UNAVAILABLE; #endif - (instancetype)initWithContentsOfIRI: (OFIRI *)IRI OF_UNAVAILABLE; - (instancetype)initWithStringRepresentation: (OFString *)string OF_UNAVAILABLE; - (instancetype)initWithBase64EncodedString: (OFString *)string OF_UNAVAILABLE; /** * @brief Returns a specific item of the OFSecureData. * * Modifying the returned item directly is allowed and will change the contents * of the data array. * |
︙ | ︙ | |||
184 185 186 187 188 189 190 | - (OFString *)stringRepresentation OF_UNAVAILABLE; - (OFString *)stringByBase64Encoding OF_UNAVAILABLE; #ifdef OF_HAVE_FILES - (void)writeToFile: (OFString *)path OF_UNAVAILABLE; #endif - (void)writeToIRI: (OFIRI *)IRI OF_UNAVAILABLE; | < | 183 184 185 186 187 188 189 190 191 192 193 | - (OFString *)stringRepresentation OF_UNAVAILABLE; - (OFString *)stringByBase64Encoding OF_UNAVAILABLE; #ifdef OF_HAVE_FILES - (void)writeToFile: (OFString *)path OF_UNAVAILABLE; #endif - (void)writeToIRI: (OFIRI *)IRI OF_UNAVAILABLE; - (OFData *)messagePackRepresentation OF_UNAVAILABLE; @end OF_ASSUME_NONNULL_END |
Modified src/OFSecureData.m from [6e16784ba9] to [47b9727f66].
︙ | ︙ | |||
510 511 512 513 514 515 516 | } - (instancetype)initWithBase64EncodedString: (OFString *)string { OF_INVALID_INIT_METHOD } | < < < < < | 510 511 512 513 514 515 516 517 518 519 520 521 522 523 | } - (instancetype)initWithBase64EncodedString: (OFString *)string { OF_INVALID_INIT_METHOD } - (void)dealloc { [self zero]; #if defined(HAVE_MMAP) && defined(HAVE_MLOCK) && defined(MAP_ANON) if (!_allowsSwappableMemory) { size_t pageSize = [OFSystemInfo pageSize]; |
︙ | ︙ | |||
629 630 631 632 633 634 635 | { OF_UNRECOGNIZED_SELECTOR } #endif - (void)writeToIRI: (OFIRI *)IRI { | < < < < < | 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 | { OF_UNRECOGNIZED_SELECTOR } #endif - (void)writeToIRI: (OFIRI *)IRI { OF_UNRECOGNIZED_SELECTOR } - (OFData *)messagePackRepresentation { OF_UNRECOGNIZED_SELECTOR } @end |
Deleted src/OFSerialization.h version [81b4f05430].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted src/OFSerialization.m version [d41532d0bc].
|
| < < < < < < < < < < < < < < < < < < < < |
Modified src/OFSet.h from [e408900b6b] to [b6b0fc8990].
︙ | ︙ | |||
20 21 22 23 24 25 26 | # define __STDC_CONSTANT_MACROS #endif #include <stdarg.h> #import "OFObject.h" #import "OFCollection.h" | < | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | # define __STDC_CONSTANT_MACROS #endif #include <stdarg.h> #import "OFObject.h" #import "OFCollection.h" OF_ASSUME_NONNULL_BEGIN /** @file */ @class OFArray OF_GENERIC(ObjectType); |
︙ | ︙ | |||
59 60 61 62 63 64 65 | * @warning Do not mutate objects that are in a set! Changing the hash of * objects in a set breaks the internal representation of the set! * * @note Subclasses must implement @ref count, @ref containsObject: and * @ref objectEnumerator. */ @interface OFSet OF_GENERIC(ObjectType): OFObject <OFCollection, OFCopying, | | | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | * @warning Do not mutate objects that are in a set! Changing the hash of * objects in a set breaks the internal representation of the set! * * @note Subclasses must implement @ref count, @ref containsObject: and * @ref objectEnumerator. */ @interface OFSet OF_GENERIC(ObjectType): OFObject <OFCollection, OFCopying, OFMutableCopying> #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) # define ObjectType id #endif /** * @brief An array of all objects in the set. */ @property (readonly, nonatomic) OFArray OF_GENERIC(ObjectType) *allObjects; |
︙ | ︙ |
Modified src/OFSet.m from [c24561f595] to [a5c8b76a0d].
︙ | ︙ | |||
18 19 20 21 22 23 24 | #include <stdlib.h> #import "OFSet.h" #import "OFArray.h" #import "OFMapTableSet.h" #import "OFNull.h" #import "OFString.h" | < | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include <stdlib.h> #import "OFSet.h" #import "OFArray.h" #import "OFMapTableSet.h" #import "OFNull.h" #import "OFString.h" static struct { Class isa; } placeholder; @interface OFSetPlaceholder: OFSet @end |
︙ | ︙ | |||
68 69 70 71 72 73 74 | - (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments { return (id)[[OFMapTableSet alloc] initWithObject: firstObject arguments: arguments]; } | < < < < < | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | - (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments { return (id)[[OFMapTableSet alloc] initWithObject: firstObject arguments: arguments]; } - (instancetype)retain { return self; } - (instancetype)autorelease { |
︙ | ︙ | |||
187 188 189 190 191 192 193 | va_end(arguments); return ret; } - (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments { | < < < < < | 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | va_end(arguments); return ret; } - (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments { OF_INVALID_INIT_METHOD } - (size_t)count { OF_UNRECOGNIZED_SELECTOR } |
︙ | ︙ | |||
358 359 360 361 362 363 364 | for (id object in self) if ([set containsObject: object]) return true; return false; } | < < < < < < < < < < < < < < < < < < < < < < < < < | 347 348 349 350 351 352 353 354 355 356 357 358 359 360 | for (id object in self) if ([set containsObject: object]) return true; return false; } - (OFSet *)setByAddingObjectsFromSet: (OFSet *)set { OFMutableSet *new = [[self mutableCopy] autorelease]; [new unionSet: set]; [new makeImmutable]; return new; } |
︙ | ︙ |
Deleted src/OFString+Serialization.h version [562111770b].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted src/OFString+Serialization.m version [814c47790a].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Modified src/OFString.h from [0d179dd073] to [55ba0a041b].
︙ | ︙ | |||
33 34 35 36 37 38 39 | #include <stdint.h> #ifdef OF_HAVE_INTTYPES_H # include <inttypes.h> #endif #include "OFObject.h" #ifdef __OBJC__ | < | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | #include <stdint.h> #ifdef OF_HAVE_INTTYPES_H # include <inttypes.h> #endif #include "OFObject.h" #ifdef __OBJC__ # import "OFJSONRepresentation.h" # import "OFMessagePackRepresentation.h" #endif OF_ASSUME_NONNULL_BEGIN /** @file */ |
︙ | ︙ | |||
140 141 142 143 144 145 146 | /** * @class OFString OFString.h ObjFW/OFString.h * * @brief A class for handling strings. */ @interface OFString: OFObject <OFCopying, OFMutableCopying, OFComparing, | | | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | /** * @class OFString OFString.h ObjFW/OFString.h * * @brief A class for handling strings. */ @interface OFString: OFObject <OFCopying, OFMutableCopying, OFComparing, OFJSONRepresentation, OFMessagePackRepresentation> /** * @brief The length of the string in Unicode codepoints. */ @property (readonly, nonatomic) size_t length; /** * @brief The OFString as a UTF-8 encoded C string. |
︙ | ︙ | |||
1367 1368 1369 1370 1371 1372 1373 | # import "OFString+CryptographicHashing.h" # import "OFString+JSONParsing.h" # ifdef OF_HAVE_FILES # import "OFString+PathAdditions.h" # endif # import "OFString+PercentEncoding.h" # import "OFString+PropertyListParsing.h" | < | 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 | # import "OFString+CryptographicHashing.h" # import "OFString+JSONParsing.h" # ifdef OF_HAVE_FILES # import "OFString+PathAdditions.h" # endif # import "OFString+PercentEncoding.h" # import "OFString+PropertyListParsing.h" # import "OFString+XMLEscaping.h" # import "OFString+XMLUnescaping.h" #endif #if defined(__OBJC__) && !defined(NSINTEGER_DEFINED) && !__has_feature(modules) /* * Very *ugly* hack required for string boxing literals to work. |
︙ | ︙ |
Modified src/OFString.m from [9e1175061f] to [6c5b7de32e].
︙ | ︙ | |||
42 43 44 45 46 47 48 | #import "OFIRI.h" #import "OFIRIHandler.h" #import "OFLocale.h" #import "OFStream.h" #import "OFSystemInfo.h" #import "OFUTF8String.h" #import "OFUTF8String+Private.h" | < | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | #import "OFIRI.h" #import "OFIRIHandler.h" #import "OFLocale.h" #import "OFStream.h" #import "OFSystemInfo.h" #import "OFUTF8String.h" #import "OFUTF8String+Private.h" #import "OFGetItemAttributesFailedException.h" #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFInvalidEncodingException.h" #import "OFInvalidFormatException.h" #import "OFNotImplementedException.h" |
︙ | ︙ | |||
131 132 133 134 135 136 137 | _OFString_CryptographicHashing_reference = 1; _OFString_JSONParsing_reference = 1; #ifdef OF_HAVE_FILES _OFString_PathAdditions_reference = 1; #endif _OFString_PercentEncoding_reference = 1; _OFString_PropertyListParsing_reference = 1; | < | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | _OFString_CryptographicHashing_reference = 1; _OFString_JSONParsing_reference = 1; #ifdef OF_HAVE_FILES _OFString_PathAdditions_reference = 1; #endif _OFString_PercentEncoding_reference = 1; _OFString_PropertyListParsing_reference = 1; _OFString_XMLEscaping_reference = 1; _OFString_XMLUnescaping_reference = 1; } void _reference_to_OFConstantString(void) { |
︙ | ︙ | |||
590 591 592 593 594 595 596 | - (instancetype)initWithContentsOfIRI: (OFIRI *)IRI encoding: (OFStringEncoding)encoding { return (id)[[OFUTF8String alloc] initWithContentsOfIRI: IRI encoding: encoding]; } | < < < < < | 588 589 590 591 592 593 594 595 596 597 598 599 600 601 | - (instancetype)initWithContentsOfIRI: (OFIRI *)IRI encoding: (OFStringEncoding)encoding { return (id)[[OFUTF8String alloc] initWithContentsOfIRI: IRI encoding: encoding]; } - (instancetype)retain { return self; } - (instancetype)autorelease { |
︙ | ︙ | |||
1072 1073 1074 1075 1076 1077 1078 | if (encoding == OFStringEncodingAutodetect) encoding = OFStringEncodingUTF8; self = [self initWithCString: data.items encoding: encoding length: data.count * data.itemSize]; | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 | if (encoding == OFStringEncodingAutodetect) encoding = OFStringEncodingUTF8; self = [self initWithCString: data.items encoding: encoding length: data.count * data.itemSize]; objc_autoreleasePoolPop(pool); return self; } - (size_t)of_getCString: (char *)cString maxLength: (size_t)maxLength |
︙ | ︙ | |||
1678 1679 1680 1681 1682 1683 1684 | } - (OFString *)description { return [[self copy] autorelease]; } | < < < < < < < < < < < < < < < < < < < < < < | 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 | } - (OFString *)description { return [[self copy] autorelease]; } - (OFString *)JSONRepresentation { return [self of_JSONRepresentationWithOptions: 0 depth: 0]; } - (OFString *)JSONRepresentationWithOptions: (OFJSONRepresentationOptions)options |
︙ | ︙ |
Modified src/OFUUID.h from [9269e86a14] to [ac563eb1fe].
︙ | ︙ | |||
10 11 12 13 14 15 16 | * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" | < | | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" OF_ASSUME_NONNULL_BEGIN @class OFString; /** * @class OFUUID OFUUID.h ObjFW/OFUUID.h * * @brief A UUID conforming to RFC 4122. */ OF_SUBCLASSING_RESTRICTED @interface OFUUID: OFObject <OFCopying, OFComparing> { unsigned char _bytes[16]; } /** * @brief The UUID as a string. */ |
︙ | ︙ |
Modified src/OFUUID.m from [9c0ce1a511] to [81553fcc1d].
︙ | ︙ | |||
14 15 16 17 18 19 20 | */ #include "config.h" #import "OFUUID.h" #import "OFArray.h" #import "OFString.h" | < | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | */ #include "config.h" #import "OFUUID.h" #import "OFArray.h" #import "OFString.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFOutOfRangeException.h" #define bytesSize 16 |
︙ | ︙ | |||
141 142 143 144 145 146 147 | [self release]; @throw e; } return self; } | < < < < < < < < < < < < < < < < < < < < < < < | 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | [self release]; @throw e; } return self; } - (bool)isEqual: (id)object { OFUUID *UUID; if (![object isKindOfClass: [OFUUID class]]) return false; |
︙ | ︙ | |||
231 232 233 234 235 236 237 | _bytes[12], _bytes[13], _bytes[14], _bytes[15]]; } - (OFString *)description { return self.UUIDString; } | < < < < < < < < < < < < < < | 207 208 209 210 211 212 213 214 | _bytes[12], _bytes[13], _bytes[14], _bytes[15]]; } - (OFString *)description { return self.UUIDString; } @end |
Modified src/OFXMLAttribute.h from [a0373a3fcd] to [ad0369cec2].
︙ | ︙ | |||
88 89 90 91 92 93 94 | * @param nameSpace The namespace of the attribute * @param stringValue The string value of the attribute * @return An initialized OFXMLAttribute with the specified parameters */ - (instancetype)initWithName: (OFString *)name namespace: (nullable OFString *)nameSpace stringValue: (OFString *)stringValue OF_DESIGNATED_INITIALIZER; | < < | 88 89 90 91 92 93 94 95 96 97 | * @param nameSpace The namespace of the attribute * @param stringValue The string value of the attribute * @return An initialized OFXMLAttribute with the specified parameters */ - (instancetype)initWithName: (OFString *)name namespace: (nullable OFString *)nameSpace stringValue: (OFString *)stringValue OF_DESIGNATED_INITIALIZER; @end OF_ASSUME_NONNULL_END |
Modified src/OFXMLAttribute.m from [b0ce591345] to [5c47193c55].
︙ | ︙ | |||
15 16 17 18 19 20 21 | #include "config.h" #import "OFXMLAttribute.h" #import "OFXMLNode+Private.h" #import "OFString.h" #import "OFDictionary.h" | < | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #include "config.h" #import "OFXMLAttribute.h" #import "OFXMLNode+Private.h" #import "OFString.h" #import "OFDictionary.h" #import "OFInvalidArgumentException.h" @implementation OFXMLAttribute @synthesize name = _name, namespace = _namespace; + (instancetype)attributeWithName: (OFString *)name |
︙ | ︙ | |||
61 62 63 64 65 66 67 | _namespace = [namespace copy]; _stringValue = [stringValue copy]; } @catch (id e) { [self release]; @throw e; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | _namespace = [namespace copy]; _stringValue = [stringValue copy]; } @catch (id e) { [self release]; @throw e; } return self; } - (void)dealloc { [_name release]; [_namespace release]; |
︙ | ︙ | |||
159 160 161 162 163 164 165 | OFHashAddHash(&hash, _stringValue.hash); OFHashFinalize(&hash); return hash; } | < < < < < < < < < < < < < < < < < < < < < < < | 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | OFHashAddHash(&hash, _stringValue.hash); OFHashFinalize(&hash); return hash; } - (OFString *)description { return [OFString stringWithFormat: @"<%@: name=%@, namespace=%@, " @"stringValue=%@>", self.class, _name, _namespace, _stringValue]; } @end |
Modified src/OFXMLCDATA.h from [cbe6268a21] to [0b1ca7487a].
︙ | ︙ | |||
39 40 41 42 43 44 45 | /** * @brief Initializes an already allocated OFXMLCDATA with the specified string. * * @param string The string value for the CDATA * @return An initialized OFXMLCDATA */ - (instancetype)initWithString: (OFString *)string; | < < | 39 40 41 42 43 44 45 46 47 48 | /** * @brief Initializes an already allocated OFXMLCDATA with the specified string. * * @param string The string value for the CDATA * @return An initialized OFXMLCDATA */ - (instancetype)initWithString: (OFString *)string; @end OF_ASSUME_NONNULL_END |
Modified src/OFXMLCDATA.m from [782cf60cb2] to [b5a30e1981].
︙ | ︙ | |||
14 15 16 17 18 19 20 | */ #include "config.h" #import "OFXMLCDATA.h" #import "OFXMLNode+Private.h" #import "OFString.h" | < < < < < < < < < < < < < < < < < < < < < < < | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | */ #include "config.h" #import "OFXMLCDATA.h" #import "OFXMLNode+Private.h" #import "OFString.h" #import "OFInvalidArgumentException.h" @implementation OFXMLCDATA + (instancetype)CDATAWithString: (OFString *)string { return [[[self alloc] initWithString: string] autorelease]; } - (instancetype)initWithString: (OFString *)string { self = [super of_init]; @try { _CDATA = [string copy]; } @catch (id e) { [self release]; @throw e; } return self; } - (void)dealloc { [_CDATA release]; |
︙ | ︙ | |||
116 117 118 119 120 121 122 | return [ret autorelease]; } - (OFString *)description { return self.XMLString; } | < < < < < < < < < < | 93 94 95 96 97 98 99 100 | return [ret autorelease]; } - (OFString *)description { return self.XMLString; } @end |
Modified src/OFXMLCharacters.h from [01b164c13a] to [d7b0cc572e].
︙ | ︙ | |||
40 41 42 43 44 45 46 | * @brief Initializes an already allocated OFXMLCharacters with the specified * string. * * @param string The string value for the characters * @return An initialized OFXMLCharacters */ - (instancetype)initWithString: (OFString *)string; | < < | 40 41 42 43 44 45 46 47 48 49 | * @brief Initializes an already allocated OFXMLCharacters with the specified * string. * * @param string The string value for the characters * @return An initialized OFXMLCharacters */ - (instancetype)initWithString: (OFString *)string; @end OF_ASSUME_NONNULL_END |
Modified src/OFXMLCharacters.m from [0f7714df74] to [d4a7b166de].
︙ | ︙ | |||
14 15 16 17 18 19 20 | */ #include "config.h" #import "OFXMLCharacters.h" #import "OFXMLNode+Private.h" #import "OFString.h" | < < < < < < < < < < < < < < < < < < < < < < < | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | */ #include "config.h" #import "OFXMLCharacters.h" #import "OFXMLNode+Private.h" #import "OFString.h" #import "OFInvalidArgumentException.h" @implementation OFXMLCharacters + (instancetype)charactersWithString: (OFString *)string { return [[[self alloc] initWithString: string] autorelease]; } - (instancetype)initWithString: (OFString *)string { self = [super of_init]; @try { _characters = [string copy]; } @catch (id e) { [self release]; @throw e; } return self; } - (void)dealloc { [_characters release]; |
︙ | ︙ | |||
108 109 110 111 112 113 114 | return _characters.stringByXMLEscaping; } - (OFString *)description { return self.XMLString; } | < < < < < < < | 85 86 87 88 89 90 91 92 | return _characters.stringByXMLEscaping; } - (OFString *)description { return self.XMLString; } @end |
Modified src/OFXMLComment.h from [ccfce93aa5] to [0ac62de2c0].
︙ | ︙ | |||
45 46 47 48 49 50 51 | * @brief Initializes an already allocated OFXMLComment with the specified * text. * * @param text The text for the comment * @return An initialized OFXMLComment */ - (instancetype)initWithText: (OFString *)text; | < < | 45 46 47 48 49 50 51 52 53 54 | * @brief Initializes an already allocated OFXMLComment with the specified * text. * * @param text The text for the comment * @return An initialized OFXMLComment */ - (instancetype)initWithText: (OFString *)text; @end OF_ASSUME_NONNULL_END |
Modified src/OFXMLComment.m from [11b3b9f1cf] to [72a694fdfc].
︙ | ︙ | |||
16 17 18 19 20 21 22 | #include "config.h" #include <string.h> #import "OFXMLComment.h" #import "OFXMLNode+Private.h" #import "OFString.h" | < | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #include <string.h> #import "OFXMLComment.h" #import "OFXMLNode+Private.h" #import "OFString.h" #import "OFInvalidArgumentException.h" @implementation OFXMLComment @synthesize text = _text; + (instancetype)commentWithText: (OFString *)text |
︙ | ︙ | |||
39 40 41 42 43 44 45 | @try { _text = [text copy]; } @catch (id e) { [self release]; @throw e; } | < < < < < < < < < < < < < < < < < < < < < < | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | @try { _text = [text copy]; } @catch (id e) { [self release]; @throw e; } return self; } - (void)dealloc { [_text release]; |
︙ | ︙ | |||
105 106 107 108 109 110 111 | return [OFString stringWithFormat: @"<!--%@-->", _text]; } - (OFString *)description { return self.XMLString; } | < < < < < < < | 82 83 84 85 86 87 88 89 | return [OFString stringWithFormat: @"<!--%@-->", _text]; } - (OFString *)description { return self.XMLString; } @end |
Deleted src/OFXMLElement+Serialization.h version [fe095a2964].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted src/OFXMLElement+Serialization.m version [e7e3d1e4e8].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Modified src/OFXMLElement.h from [88a9b5d1f0] to [30ce632507].
︙ | ︙ | |||
430 431 432 433 434 435 436 | * needs a prefix */ - (OFString *)XMLStringWithDefaultNamespace: (OFString *)defaultNS indentation: (unsigned int)indentation; @end OF_ASSUME_NONNULL_END | < < | 430 431 432 433 434 435 436 | * needs a prefix */ - (OFString *)XMLStringWithDefaultNamespace: (OFString *)defaultNS indentation: (unsigned int)indentation; @end OF_ASSUME_NONNULL_END |
Modified src/OFXMLElement.m from [c4955d77b3] to [b73068b828].
︙ | ︙ | |||
34 35 36 37 38 39 40 | #import "OFXMLParser.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFMalformedXMLException.h" #import "OFUnboundNamespaceException.h" | < < < < < < < | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | #import "OFXMLParser.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFMalformedXMLException.h" #import "OFUnboundNamespaceException.h" @interface OFXMLElementElementBuilderDelegate: OFObject <OFXMLElementBuilderDelegate> { @public OFXMLElement *_element; } @end |
︙ | ︙ | |||
263 264 265 266 267 268 269 | [_attributes release]; _attributes = [element->_attributes retain]; [_namespaces release]; _namespaces = [element->_namespaces retain]; [_children release]; _children = [element->_children retain]; | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | [_attributes release]; _attributes = [element->_attributes retain]; [_namespaces release]; _namespaces = [element->_namespaces retain]; [_children release]; _children = [element->_children retain]; objc_autoreleasePoolPop(pool); } @catch (id e) { [self release]; @throw e; } return self; |
︙ | ︙ | |||
664 665 666 667 668 669 670 | { return [self of_XMLStringWithDefaultNS: defaultNS namespaces: nil indentation: indentation level: 0]; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 559 560 561 562 563 564 565 566 567 568 569 570 571 572 | { return [self of_XMLStringWithDefaultNS: defaultNS namespaces: nil indentation: indentation level: 0]; } - (void)addAttribute: (OFXMLAttribute *)attribute { if (![attribute isKindOfClass: [OFXMLAttribute class]]) @throw [OFInvalidArgumentException exception]; if (_attributes == nil) _attributes = [[OFMutableArray alloc] init]; |
︙ | ︙ |
Modified src/OFXMLNode.h from [b1cf55fec8] to [ed1c4fdaa7].
︙ | ︙ | |||
10 11 12 13 14 15 16 | * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" | < < < | | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" OF_ASSUME_NONNULL_BEGIN /** * @class OFXMLNode OFXMLNode.h ObjFW/OFXMLNode.h * * @brief A class which stores an XML element. */ @interface OFXMLNode: OFObject <OFCopying> { OF_RESERVE_IVARS(OFXMLNode, 4) } /** * @brief The contents of the node as a string value. * |
︙ | ︙ | |||
73 74 75 76 77 78 79 | * @throw OFUnboundNamespaceException The node uses a namespace that was not * bound to a prefix in a context where it * needs a prefix */ @property (readonly, nonatomic) OFString *XMLString; - (instancetype)init OF_UNAVAILABLE; | < | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | * @throw OFUnboundNamespaceException The node uses a namespace that was not * bound to a prefix in a context where it * needs a prefix */ @property (readonly, nonatomic) OFString *XMLString; - (instancetype)init OF_UNAVAILABLE; /** * @brief The contents of the receiver as a `long long` value in the specified * base. * * @param base The base to use. If the base is 0, base 16 is assumed if the * string starts with 0x (after stripping white spaces). If the |
︙ | ︙ |
Modified src/OFXMLNode.m from [dcf0255e3f] to [db9f6871fb].
︙ | ︙ | |||
25 26 27 28 29 30 31 | } - (instancetype)init { OF_INVALID_INIT_METHOD } | < < < < < | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | } - (instancetype)init { OF_INVALID_INIT_METHOD } - (OFString *)stringValue { OF_UNRECOGNIZED_SELECTOR } - (void)setStringValue: (OFString *)stringValue { |
︙ | ︙ | |||
80 81 82 83 84 85 86 | } - (OFString *)description { return self.XMLString; } | < < < < < | 75 76 77 78 79 80 81 82 83 84 85 86 | } - (OFString *)description { return self.XMLString; } - (id)copy { return [self retain]; } @end |
Modified src/OFXMLProcessingInstruction.h from [5592054efd] to [ea520587d0].
︙ | ︙ | |||
56 57 58 59 60 61 62 | * * @param target The target for the processing instruction * @param text The text for the processing instruction * @return An initialized OFXMLProcessingInstruction */ - (instancetype)initWithTarget: (OFString *)target text: (OFString *)text OF_DESIGNATED_INITIALIZER; | < < | 56 57 58 59 60 61 62 63 64 65 | * * @param target The target for the processing instruction * @param text The text for the processing instruction * @return An initialized OFXMLProcessingInstruction */ - (instancetype)initWithTarget: (OFString *)target text: (OFString *)text OF_DESIGNATED_INITIALIZER; @end OF_ASSUME_NONNULL_END |
Modified src/OFXMLProcessingInstruction.m from [444877ce0f] to [44d4bf9d3c].
︙ | ︙ | |||
16 17 18 19 20 21 22 | #include "config.h" #include <string.h> #import "OFXMLProcessingInstruction.h" #import "OFString.h" #import "OFXMLAttribute.h" | < | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #include <string.h> #import "OFXMLProcessingInstruction.h" #import "OFString.h" #import "OFXMLAttribute.h" #import "OFXMLNode+Private.h" #import "OFInvalidArgumentException.h" @implementation OFXMLProcessingInstruction @synthesize target = _target, text = _text; |
︙ | ︙ | |||
44 45 46 47 48 49 50 | _target = [target copy]; _text = [text copy]; } @catch (id e) { [self release]; @throw e; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | _target = [target copy]; _text = [text copy]; } @catch (id e) { [self release]; @throw e; } return self; } - (void)dealloc { [_target release]; [_text release]; |
︙ | ︙ | |||
134 135 136 137 138 139 140 | return [OFString stringWithFormat: @"<?%@?>", _target]; } - (OFString *)description { return self.XMLString; } | < < < < < < < < < < < < < < < | 106 107 108 109 110 111 112 113 | return [OFString stringWithFormat: @"<?%@?>", _target]; } - (OFString *)description { return self.XMLString; } @end |
Modified tests/Makefile from [331c812adc] to [2beb632548].
1 2 3 4 5 6 7 8 9 10 11 12 | include ../extra.mk SUBDIRS = ${TESTPLUGIN} \ ${OBJC_SYNC} \ terminal CLEAN = EBOOT.PBP \ boot.dol \ ${PROG_NOINST}.arm9 \ ${PROG_NOINST}.nds \ ${PROG_NOINST}.nro \ ${PROG_NOINST}.rpx \ | < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | include ../extra.mk SUBDIRS = ${TESTPLUGIN} \ ${OBJC_SYNC} \ terminal CLEAN = EBOOT.PBP \ boot.dol \ ${PROG_NOINST}.arm9 \ ${PROG_NOINST}.nds \ ${PROG_NOINST}.nro \ ${PROG_NOINST}.rpx \ testfile_bin.m \ testfile_ini.m DISTCLEAN = Info.plist PROG_NOINST = tests${PROG_SUFFIX} STATIC_LIB_NOINST = ${TESTS_STATIC_LIB} SRCS = ForwardingTests.m \ |
︙ | ︙ | |||
44 45 46 47 48 49 50 | OFRIPEMD160HashTests.m \ OFSHA1HashTests.m \ OFSHA224HashTests.m \ OFSHA256HashTests.m \ OFSHA384HashTests.m \ OFSHA512HashTests.m \ OFScryptTests.m \ | < < | 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 69 70 71 72 | OFRIPEMD160HashTests.m \ OFSHA1HashTests.m \ OFSHA224HashTests.m \ OFSHA256HashTests.m \ OFSHA384HashTests.m \ OFSHA512HashTests.m \ OFScryptTests.m \ OFSetTests.m \ OFStreamTests.m \ OFStringTests.m \ OFSystemInfoTests.m \ OFValueTests.m \ OFXMLElementBuilderTests.m \ OFXMLNodeTests.m \ OFXMLParserTests.m \ RuntimeTests.m \ ${RUNTIME_ARC_TESTS_M} \ TestsAppDelegate.m \ ${USE_SRCS_FILES} \ ${USE_SRCS_PLUGINS} \ ${USE_SRCS_SOCKETS} \ ${USE_SRCS_THREADS} \ ${USE_SRCS_WINDOWS} \ testfile_bin.m \ testfile_ini.m SRCS_PLUGINS = OFPluginTests.m SRCS_SOCKETS = OFDNSResolverTests.m \ ${OF_HTTP_CLIENT_TESTS_M} \ OFHTTPCookieTests.m \ OFHTTPCookieManagerTests.m \ |
︙ | ︙ | |||
90 91 92 93 94 95 96 | SRCS_WINDOWS = OFWindowsRegistryKeyTests.m IOS_USER ?= mobile IOS_TMP ?= /tmp/objfw-test include ../buildsys.mk | < < | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | SRCS_WINDOWS = OFWindowsRegistryKeyTests.m IOS_USER ?= mobile IOS_TMP ?= /tmp/objfw-test include ../buildsys.mk testfile_bin.m: testfile.bin ${SHELL} ../utils/objfw-embed testfile.bin testfile.bin $@ testfile_ini.m: testfile.ini ${SHELL} ../utils/objfw-embed testfile.ini testfile.ini $@ .PHONY: run run-on-ios run-on-android run: |
︙ | ︙ |
Deleted tests/OFSerializationTests.m version [8955c90831].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Modified tests/TestsAppDelegate.h from [2856569726] to [c08d2cfc07].
︙ | ︙ | |||
227 228 229 230 231 232 233 | - (void)SPXSocketTests; @end @interface TestsAppDelegate (OFSPXStreamSocketTests) - (void)SPXStreamSocketTests; @end | < < < < | 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | - (void)SPXSocketTests; @end @interface TestsAppDelegate (OFSPXStreamSocketTests) - (void)SPXStreamSocketTests; @end @interface TestsAppDelegate (OFSetTests) - (void)setTests; @end @interface TestsAppDelegate (OFSystemInfoTests) - (void)systemInfoTests; @end |
︙ | ︙ |
Modified tests/TestsAppDelegate.m from [188b6037b1] to [252b4a628c].
︙ | ︙ | |||
436 437 438 439 440 441 442 | #ifdef OF_HAVE_SOCKETS [self HTTPCookieTests]; [self HTTPCookieManagerTests]; #endif [self XMLParserTests]; [self XMLNodeTests]; [self XMLElementBuilderTests]; | < | 436 437 438 439 440 441 442 443 444 445 446 447 448 449 | #ifdef OF_HAVE_SOCKETS [self HTTPCookieTests]; [self HTTPCookieManagerTests]; #endif [self XMLParserTests]; [self XMLNodeTests]; [self XMLElementBuilderTests]; [self JSONTests]; [self propertyListTests]; [self matrix4x4Tests]; #if defined(OF_HAVE_PLUGINS) [self pluginTests]; #endif |
︙ | ︙ |
Modified tests/iOS.xcodeproj/project.pbxproj from [b5cdee4708] to [ac2dd7d645].
︙ | ︙ | |||
9 10 11 12 13 14 15 | /* Begin PBXBuildFile section */ 4B6AB9CD202BA431007BAC7D /* TestPlugin.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4B6AB9CA202BA408007BAC7D /* TestPlugin.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 4BC7FD07201394F300280496 /* ObjFW.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC7FD06201394F300280496 /* ObjFW.framework */; }; 4BC7FD092013954B00280496 /* tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC7FD082013954B00280496 /* tests.a */; }; 4BC7FD0B2013956D00280496 /* ObjFW.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4BC7FD06201394F300280496 /* ObjFW.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 4BC7FD102013960600280496 /* testfile.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4BC7FD0C2013960600280496 /* testfile.txt */; }; 4BC7FD112013960600280496 /* testfile.bin in Resources */ = {isa = PBXBuildFile; fileRef = 4BC7FD0D2013960600280496 /* testfile.bin */; }; | < | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | /* Begin PBXBuildFile section */ 4B6AB9CD202BA431007BAC7D /* TestPlugin.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4B6AB9CA202BA408007BAC7D /* TestPlugin.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 4BC7FD07201394F300280496 /* ObjFW.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC7FD06201394F300280496 /* ObjFW.framework */; }; 4BC7FD092013954B00280496 /* tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC7FD082013954B00280496 /* tests.a */; }; 4BC7FD0B2013956D00280496 /* ObjFW.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4BC7FD06201394F300280496 /* ObjFW.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 4BC7FD102013960600280496 /* testfile.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4BC7FD0C2013960600280496 /* testfile.txt */; }; 4BC7FD112013960600280496 /* testfile.bin in Resources */ = {isa = PBXBuildFile; fileRef = 4BC7FD0D2013960600280496 /* testfile.bin */; }; 4BC7FD132013960600280496 /* testfile.ini in Resources */ = {isa = PBXBuildFile; fileRef = 4BC7FD0F2013960600280496 /* testfile.ini */; }; 4BEBFB6E2013934E002E8710 /* ImportTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BEBFB6D2013934E002E8710 /* ImportTest.m */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ 4B6AB9CC202BA428007BAC7D /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; |
︙ | ︙ | |||
43 44 45 46 47 48 49 | /* Begin PBXFileReference section */ 4B6AB9CA202BA408007BAC7D /* TestPlugin.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = TestPlugin.bundle; path = plugin/TestPlugin.bundle; sourceTree = "<group>"; }; 4BC7FD06201394F300280496 /* ObjFW.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ObjFW.framework; path = ../src/ObjFW.framework; sourceTree = "<group>"; }; 4BC7FD082013954B00280496 /* tests.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = tests.a; sourceTree = "<group>"; }; 4BC7FD0C2013960600280496 /* testfile.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = testfile.txt; sourceTree = "<group>"; }; 4BC7FD0D2013960600280496 /* testfile.bin */ = {isa = PBXFileReference; lastKnownFileType = archive.macbinary; path = testfile.bin; sourceTree = "<group>"; }; | < | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | /* Begin PBXFileReference section */ 4B6AB9CA202BA408007BAC7D /* TestPlugin.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = TestPlugin.bundle; path = plugin/TestPlugin.bundle; sourceTree = "<group>"; }; 4BC7FD06201394F300280496 /* ObjFW.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ObjFW.framework; path = ../src/ObjFW.framework; sourceTree = "<group>"; }; 4BC7FD082013954B00280496 /* tests.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = tests.a; sourceTree = "<group>"; }; 4BC7FD0C2013960600280496 /* testfile.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = testfile.txt; sourceTree = "<group>"; }; 4BC7FD0D2013960600280496 /* testfile.bin */ = {isa = PBXFileReference; lastKnownFileType = archive.macbinary; path = testfile.bin; sourceTree = "<group>"; }; 4BC7FD0F2013960600280496 /* testfile.ini */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = testfile.ini; sourceTree = "<group>"; }; 4BEBFB5B2013934E002E8710 /* tests.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = tests.app; sourceTree = BUILT_PRODUCTS_DIR; }; 4BEBFB6C2013934E002E8710 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = SOURCE_ROOT; }; 4BEBFB6D2013934E002E8710 /* ImportTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ImportTest.m; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ |
︙ | ︙ | |||
95 96 97 98 99 100 101 | sourceTree = "<group>"; }; 4BEBFB5D2013934E002E8710 /* tests */ = { isa = PBXGroup; children = ( 4BEBFB6C2013934E002E8710 /* Info.plist */, 4BEBFB6D2013934E002E8710 /* ImportTest.m */, | < | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | sourceTree = "<group>"; }; 4BEBFB5D2013934E002E8710 /* tests */ = { isa = PBXGroup; children = ( 4BEBFB6C2013934E002E8710 /* Info.plist */, 4BEBFB6D2013934E002E8710 /* ImportTest.m */, 4BC7FD0D2013960600280496 /* testfile.bin */, 4BC7FD0F2013960600280496 /* testfile.ini */, 4BC7FD0C2013960600280496 /* testfile.txt */, ); name = tests; sourceTree = "<group>"; }; |
︙ | ︙ | |||
164 165 166 167 168 169 170 | /* Begin PBXResourcesBuildPhase section */ 4BEBFB592013934E002E8710 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 4BC7FD102013960600280496 /* testfile.txt in Resources */, | < | 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | /* Begin PBXResourcesBuildPhase section */ 4BEBFB592013934E002E8710 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 4BC7FD102013960600280496 /* testfile.txt in Resources */, 4BC7FD132013960600280496 /* testfile.ini in Resources */, 4BC7FD112013960600280496 /* testfile.bin in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ |
︙ | ︙ |
Deleted tests/serialization.xml version [41f0bf4f05].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |