Comment: | Use OF_DIRECT(_MEMBERS) where appropriate |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
b6cb3addd0105716780e9e65b9dbc969 |
User & Date: | js on 2020-06-28 15:03:23 |
Other Links: | manifest | tags |
2020-06-28
| ||
15:19 | Only use objc_direct(_members) with Apple runtime check-in: 96b35d19c5 user: js tags: trunk | |
15:03 | Use OF_DIRECT(_MEMBERS) where appropriate check-in: b6cb3addd0 user: js tags: trunk | |
2020-06-27
| ||
13:30 | OFXMLParser: Make private methods static functions check-in: 218c819b39 user: js tags: trunk | |
Modified src/OFApplication.m from [2e614ff495] to [818d93f949].
︙ | ︙ | |||
68 69 70 71 72 73 74 75 76 77 78 79 80 81 | #ifdef OF_NINTENDO_DS # define asm __asm__ # include <nds.h> # undef asm #endif @interface OFApplication () - (instancetype)of_init OF_METHOD_FAMILY(init); - (void)of_setArgumentCount: (int *)argc andArgumentValues: (char **[])argv; #ifdef OF_WINDOWS - (void)of_setArgumentCount: (int)argc andWideArgumentValues: (wchar_t *[])argv; | > | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | #ifdef OF_NINTENDO_DS # define asm __asm__ # include <nds.h> # undef asm #endif OF_DIRECT_MEMBERS @interface OFApplication () - (instancetype)of_init OF_METHOD_FAMILY(init); - (void)of_setArgumentCount: (int *)argc andArgumentValues: (char **[])argv; #ifdef OF_WINDOWS - (void)of_setArgumentCount: (int)argc andWideArgumentValues: (wchar_t *[])argv; |
︙ | ︙ |
Modified src/OFArray+Private.h from [008c28aeb0] to [fad96984ad].
︙ | ︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * file. */ #import "OFArray.h" OF_ASSUME_NONNULL_BEGIN @interface OFArrayEnumerator: OFEnumerator { OFArray *_array; size_t _count; unsigned long _mutations; unsigned long *_Nullable _mutationsPtr; size_t _position; | > | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | * file. */ #import "OFArray.h" OF_ASSUME_NONNULL_BEGIN OF_DIRECT_MEMBERS @interface OFArrayEnumerator: OFEnumerator { OFArray *_array; size_t _count; unsigned long _mutations; unsigned long *_Nullable _mutationsPtr; size_t _position; |
︙ | ︙ |
Modified src/OFDNSResolver.m from [e0d24431d9] to [7061e87e9f].
︙ | ︙ | |||
61 62 63 64 65 66 67 68 69 70 71 72 73 74 | #define CNAME_RECURSION 3 @interface OFDNSResolver () <OFUDPSocketDelegate, OFTCPSocketDelegate> - (void)of_contextTimedOut: (OFDNSResolverContext *)context; @end @interface OFDNSResolverContext: OFObject { @public OFDNSQuery *_query; OFNumber *_ID; OFDNSResolverSettings *_settings; size_t _nameServersIndex; | > | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | #define CNAME_RECURSION 3 @interface OFDNSResolver () <OFUDPSocketDelegate, OFTCPSocketDelegate> - (void)of_contextTimedOut: (OFDNSResolverContext *)context; @end OF_DIRECT_MEMBERS @interface OFDNSResolverContext: OFObject { @public OFDNSQuery *_query; OFNumber *_ID; OFDNSResolverSettings *_settings; size_t _nameServersIndex; |
︙ | ︙ |
Modified src/OFData+CryptoHashing.m from [bef7610665] to [7fbcd74f01].
︙ | ︙ | |||
27 28 29 30 31 32 33 | #import "OFSHA256Hash.h" #import "OFSHA384Hash.h" #import "OFSHA512Hash.h" int _OFData_CryptoHashing_reference; @implementation OFData (CryptoHashing) | | | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | #import "OFSHA256Hash.h" #import "OFSHA384Hash.h" #import "OFSHA512Hash.h" int _OFData_CryptoHashing_reference; @implementation OFData (CryptoHashing) - (OFString *)of_cryptoHashWithClass: (Class <OFCryptoHash>)class OF_DIRECT { void *pool = objc_autoreleasePoolPush(); id <OFCryptoHash> hash = [class cryptoHashWithAllowsSwappableMemory: true]; size_t digestSize = [class digestSize]; const unsigned char *digest; char cString[digestSize * 2]; |
︙ | ︙ |
Modified src/OFDictionary.m from [473457960e] to [9428854186].
︙ | ︙ | |||
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | - (OFString *)of_JSONRepresentationWithOptions: (int)options depth: (size_t)depth; @end @interface OFDictionaryPlaceholder: OFDictionary @end @interface OFDictionaryObjectEnumerator: OFEnumerator { OFDictionary *_dictionary; OFEnumerator *_keyEnumerator; } - (instancetype)initWithDictionary: (OFDictionary *)dictionary; @end @interface OFURLQueryPartAllowedCharacterSet: OFCharacterSet + (OFCharacterSet *)URLQueryPartAllowedCharacterSet; @end @implementation OFDictionaryPlaceholder - (instancetype)init { | > > | 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 | - (OFString *)of_JSONRepresentationWithOptions: (int)options depth: (size_t)depth; @end @interface OFDictionaryPlaceholder: OFDictionary @end OF_DIRECT_MEMBERS @interface OFDictionaryObjectEnumerator: OFEnumerator { OFDictionary *_dictionary; OFEnumerator *_keyEnumerator; } - (instancetype)initWithDictionary: (OFDictionary *)dictionary; @end OF_DIRECT_MEMBERS @interface OFURLQueryPartAllowedCharacterSet: OFCharacterSet + (OFCharacterSet *)URLQueryPartAllowedCharacterSet; @end @implementation OFDictionaryPlaceholder - (instancetype)init { |
︙ | ︙ | |||
220 221 222 223 224 225 226 | + (instancetype)dictionary { return [[[self alloc] init] autorelease]; } + (instancetype)dictionaryWithDictionary: (OFDictionary *)dictionary { | > | | 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | + (instancetype)dictionary { return [[[self alloc] init] autorelease]; } + (instancetype)dictionaryWithDictionary: (OFDictionary *)dictionary { return [[(OFDictionary *)[self alloc] initWithDictionary: dictionary] autorelease]; } + (instancetype)dictionaryWithObject: (id)object forKey: (id)key { return [[[self alloc] initWithObject: object forKey: key] autorelease]; |
︙ | ︙ |
Modified src/OFEpollKernelEventObserver.m from [8fc6ef4b31] to [5306d06560].
︙ | ︙ | |||
88 89 90 91 92 93 94 | [_FDToEvents release]; [super dealloc]; } - (void)of_addObject: (id)object fileDescriptor: (int)fd | | | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | [_FDToEvents release]; [super dealloc]; } - (void)of_addObject: (id)object fileDescriptor: (int)fd events: (int)addEvents OF_DIRECT { struct epoll_event event; intptr_t events; events = (intptr_t)[_FDToEvents objectForKey: (void *)((intptr_t)fd + 1)]; |
︙ | ︙ | |||
111 112 113 114 115 116 117 | [_FDToEvents setObject: (void *)(events | addEvents) forKey: (void *)((intptr_t)fd + 1)]; } - (void)of_removeObject: (id)object fileDescriptor: (int)fd | | | 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | [_FDToEvents setObject: (void *)(events | addEvents) forKey: (void *)((intptr_t)fd + 1)]; } - (void)of_removeObject: (id)object fileDescriptor: (int)fd events: (int)removeEvents OF_DIRECT { intptr_t events; events = (intptr_t)[_FDToEvents objectForKey: (void *)((intptr_t)fd + 1)]; events &= ~removeEvents; |
︙ | ︙ |
Modified src/OFFileURLHandler.h from [852f35b467] to [8275bdd541].
︙ | ︙ | |||
16 17 18 19 20 21 22 | */ #import "OFURLHandler.h" OF_ASSUME_NONNULL_BEGIN @interface OFFileURLHandler: OFURLHandler | | | 16 17 18 19 20 21 22 23 24 25 26 | */ #import "OFURLHandler.h" OF_ASSUME_NONNULL_BEGIN @interface OFFileURLHandler: OFURLHandler + (bool)of_directoryExistsAtPath: (OFString *)path OF_DIRECT; @end OF_ASSUME_NONNULL_END |
Modified src/OFFileURLHandler.m from [94bc38aa32] to [b404d9c716].
︙ | ︙ | |||
640 641 642 643 644 645 646 | return ret; } - (void)of_setLastAccessDate: (OFDate *)lastAccessDate andModificationDate: (OFDate *)modificationDate ofItemAtURL: (OFURL *)URL | | | 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 | return ret; } - (void)of_setLastAccessDate: (OFDate *)lastAccessDate andModificationDate: (OFDate *)modificationDate ofItemAtURL: (OFURL *)URL attributes: (of_file_attributes_t)attributes OF_DIRECT { OFString *path = URL.fileSystemRepresentation; of_file_attribute_key_t attributeKey = (modificationDate != nil ? of_file_attribute_key_modification_date : of_file_attribute_key_last_access_date); if (lastAccessDate == nil) |
︙ | ︙ | |||
753 754 755 756 757 758 759 | failedAttribute: attributeKey errNo: errno]; #endif } - (void)of_setPOSIXPermissions: (OFNumber *)permissions ofItemAtURL: (OFURL *)URL | | | 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 | failedAttribute: attributeKey errNo: errno]; #endif } - (void)of_setPOSIXPermissions: (OFNumber *)permissions ofItemAtURL: (OFURL *)URL attributes: (of_file_attributes_t)attributes OF_DIRECT { #ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS uint16_t mode = permissions.uInt16Value & 0777; OFString *path = URL.fileSystemRepresentation; int status; # ifdef OF_WINDOWS |
︙ | ︙ | |||
783 784 785 786 787 788 789 | #endif } - (void)of_setOwner: (OFString *)owner andGroup: (OFString *)group ofItemAtURL: (OFURL *)URL attributeKey: (of_file_attribute_key_t)attributeKey | | | 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 | #endif } - (void)of_setOwner: (OFString *)owner andGroup: (OFString *)group ofItemAtURL: (OFURL *)URL attributeKey: (of_file_attribute_key_t)attributeKey attributes: (of_file_attributes_t)attributes OF_DIRECT { #ifdef OF_FILE_MANAGER_SUPPORTS_OWNER OFString *path = URL.fileSystemRepresentation; uid_t uid = -1; gid_t gid = -1; of_string_encoding_t encoding; |
︙ | ︙ |
Modified src/OFHTTPClient.m from [7d20d55912] to [8dda35db24].
︙ | ︙ | |||
49 50 51 52 53 54 55 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 | #import "OFUnsupportedVersionException.h" #import "OFWriteFailedException.h" #import "socket_helpers.h" #define REDIRECTS_DEFAULT 10 @interface OFHTTPClientRequestHandler: OFObject <OFTCPSocketDelegate> { @public OFHTTPClient *_client; OFHTTPRequest *_request; unsigned int _redirects; bool _firstLine; OFString *_version; int _status; OFMutableDictionary OF_GENERIC(OFString *, OFString *) *_serverHeaders; } - (instancetype)initWithClient: (OFHTTPClient *)client request: (OFHTTPRequest *)request redirects: (unsigned int)redirects; - (void)start; - (void)closeAndReconnect; @end @interface OFHTTPClientRequestBodyStream: OFStream <OFReadyForWritingObserving> { OFHTTPClientRequestHandler *_handler; OFTCPSocket *_socket; bool _chunked; uintmax_t _toWrite; bool _atEndOfStream; } - (instancetype)initWithHandler: (OFHTTPClientRequestHandler *)handler socket: (OFTCPSocket *)sock; @end @interface OFHTTPClientResponse: OFHTTPResponse <OFReadyForReadingObserving> { OFTCPSocket *_socket; bool _hasContentLength, _chunked, _keepAlive; bool _atEndOfStream, _setAtEndOfStream; intmax_t _toRead; } @property (nonatomic, setter=of_setKeepAlive:) bool of_keepAlive; - (instancetype)initWithSocket: (OFTCPSocket *)sock; @end @interface OFHTTPClientSyncPerformer: OFObject <OFHTTPClientDelegate> { OFHTTPClient *_client; OFObject <OFHTTPClientDelegate> *_delegate; OFHTTPResponse *_response; } | > > > > | 49 50 51 52 53 54 55 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 | #import "OFUnsupportedVersionException.h" #import "OFWriteFailedException.h" #import "socket_helpers.h" #define REDIRECTS_DEFAULT 10 OF_DIRECT_MEMBERS @interface OFHTTPClientRequestHandler: OFObject <OFTCPSocketDelegate> { @public OFHTTPClient *_client; OFHTTPRequest *_request; unsigned int _redirects; bool _firstLine; OFString *_version; int _status; OFMutableDictionary OF_GENERIC(OFString *, OFString *) *_serverHeaders; } - (instancetype)initWithClient: (OFHTTPClient *)client request: (OFHTTPRequest *)request redirects: (unsigned int)redirects; - (void)start; - (void)closeAndReconnect; @end OF_DIRECT_MEMBERS @interface OFHTTPClientRequestBodyStream: OFStream <OFReadyForWritingObserving> { OFHTTPClientRequestHandler *_handler; OFTCPSocket *_socket; bool _chunked; uintmax_t _toWrite; bool _atEndOfStream; } - (instancetype)initWithHandler: (OFHTTPClientRequestHandler *)handler socket: (OFTCPSocket *)sock; @end OF_DIRECT_MEMBERS @interface OFHTTPClientResponse: OFHTTPResponse <OFReadyForReadingObserving> { OFTCPSocket *_socket; bool _hasContentLength, _chunked, _keepAlive; bool _atEndOfStream, _setAtEndOfStream; intmax_t _toRead; } @property (nonatomic, setter=of_setKeepAlive:) bool of_keepAlive; - (instancetype)initWithSocket: (OFTCPSocket *)sock; @end OF_DIRECT_MEMBERS @interface OFHTTPClientSyncPerformer: OFObject <OFHTTPClientDelegate> { OFHTTPClient *_client; OFObject <OFHTTPClientDelegate> *_delegate; OFHTTPResponse *_response; } |
︙ | ︙ |
Modified src/OFHTTPServer.m from [9e1f23cc19] to [868929166e].
︙ | ︙ | |||
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | * FIXME: Key normalization replaces headers like "DNT" with "Dnt". * FIXME: Errors are not reported to the user. */ @interface OFHTTPServer () <OFTCPSocketDelegate> @end @interface OFHTTPServerResponse: OFHTTPResponse <OFReadyForWritingObserving> { OFStreamSocket *_socket; OFHTTPServer *_server; OFHTTPRequest *_request; bool _chunked, _headersSent; } - (instancetype)initWithSocket: (OFStreamSocket *)sock server: (OFHTTPServer *)server request: (OFHTTPRequest *)request; @end @interface OFHTTPServerConnection: OFObject <OFTCPSocketDelegate> { @public OFStreamSocket *_socket; OFHTTPServer *_server; OFTimer *_timer; enum { | > > | 53 54 55 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 | * FIXME: Key normalization replaces headers like "DNT" with "Dnt". * FIXME: Errors are not reported to the user. */ @interface OFHTTPServer () <OFTCPSocketDelegate> @end OF_DIRECT_MEMBERS @interface OFHTTPServerResponse: OFHTTPResponse <OFReadyForWritingObserving> { OFStreamSocket *_socket; OFHTTPServer *_server; OFHTTPRequest *_request; bool _chunked, _headersSent; } - (instancetype)initWithSocket: (OFStreamSocket *)sock server: (OFHTTPServer *)server request: (OFHTTPRequest *)request; @end OF_DIRECT_MEMBERS @interface OFHTTPServerConnection: OFObject <OFTCPSocketDelegate> { @public OFStreamSocket *_socket; OFHTTPServer *_server; OFTimer *_timer; enum { |
︙ | ︙ | |||
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | server: (OFHTTPServer *)server; - (bool)parseProlog: (OFString *)line; - (bool)parseHeaders: (OFString *)line; - (bool)sendErrorAndClose: (short)statusCode; - (void)createResponse; @end @interface OFHTTPServerRequestBodyStream: OFStream <OFReadyForReadingObserving> { OFStreamSocket *_socket; bool _chunked; intmax_t _toRead; bool _atEndOfStream, _setAtEndOfStream; } - (instancetype)initWithSocket: (OFStreamSocket *)sock chunked: (bool)chunked contentLength: (uintmax_t)contentLength; @end #ifdef OF_HAVE_THREADS @interface OFHTTPServerThread: OFThread - (void)stop; @end #endif static OF_INLINE OFString * normalizedKey(OFString *key) | > > | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | server: (OFHTTPServer *)server; - (bool)parseProlog: (OFString *)line; - (bool)parseHeaders: (OFString *)line; - (bool)sendErrorAndClose: (short)statusCode; - (void)createResponse; @end OF_DIRECT_MEMBERS @interface OFHTTPServerRequestBodyStream: OFStream <OFReadyForReadingObserving> { OFStreamSocket *_socket; bool _chunked; intmax_t _toRead; bool _atEndOfStream, _setAtEndOfStream; } - (instancetype)initWithSocket: (OFStreamSocket *)sock chunked: (bool)chunked contentLength: (uintmax_t)contentLength; @end #ifdef OF_HAVE_THREADS OF_DIRECT_MEMBERS @interface OFHTTPServerThread: OFThread - (void)stop; @end #endif static OF_INLINE OFString * normalizedKey(OFString *key) |
︙ | ︙ |
Modified src/OFINICategory+Private.h from [c23b5362fb] to [daec4f9da8].
︙ | ︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #import "OFINICategory.h" #import "OFString.h" OF_ASSUME_NONNULL_BEGIN @class OFStream; @interface OFINICategory () - (instancetype)of_initWithName: (OFString *)name OF_METHOD_FAMILY(init); - (void)of_parseLine: (OFString *)line; - (bool)of_writeToStream: (OFStream *)stream encoding: (of_string_encoding_t)encoding first: (bool)first; @end | > | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #import "OFINICategory.h" #import "OFString.h" OF_ASSUME_NONNULL_BEGIN @class OFStream; OF_DIRECT_MEMBERS @interface OFINICategory () - (instancetype)of_initWithName: (OFString *)name OF_METHOD_FAMILY(init); - (void)of_parseLine: (OFString *)line; - (bool)of_writeToStream: (OFStream *)stream encoding: (of_string_encoding_t)encoding first: (bool)first; @end |
︙ | ︙ |
Modified src/OFINICategory.m from [78d0c3480f] to [6f7f003a8d].
︙ | ︙ | |||
118 119 120 121 122 123 124 | [super dealloc]; } @end @implementation OFINICategory @synthesize name = _name; | | | 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | [super dealloc]; } @end @implementation OFINICategory @synthesize name = _name; - (instancetype)of_initWithName: (OFString *)name OF_DIRECT { self = [super init]; @try { _name = [name copy]; _lines = [[OFMutableArray alloc] init]; } @catch (id e) { |
︙ | ︙ |
Modified src/OFINIFile.m from [5e409bb0b6] to [e386265069].
︙ | ︙ | |||
25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #import "OFFile.h" #import "OFINICategory.h" #import "OFINICategory+Private.h" #import "OFInvalidFormatException.h" #import "OFOpenItemFailedException.h" @interface OFINIFile () - (void)of_parseFile: (OFString *)path encoding: (of_string_encoding_t)encoding; @end static bool isWhitespaceLine(OFString *line) | > | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | #import "OFFile.h" #import "OFINICategory.h" #import "OFINICategory+Private.h" #import "OFInvalidFormatException.h" #import "OFOpenItemFailedException.h" OF_DIRECT_MEMBERS @interface OFINIFile () - (void)of_parseFile: (OFString *)path encoding: (of_string_encoding_t)encoding; @end static bool isWhitespaceLine(OFString *line) |
︙ | ︙ |
Modified src/OFINIFileSettings.m from [c14945381a] to [9d965e74da].
︙ | ︙ | |||
52 53 54 55 56 57 58 | [_INIFile release]; [super dealloc]; } - (void)of_getCategory: (OFString **)category andKey: (OFString **)key | | | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | [_INIFile release]; [super dealloc]; } - (void)of_getCategory: (OFString **)category andKey: (OFString **)key forPath: (OFString *)path OF_DIRECT { size_t pos = [path rangeOfString: @"." options: OF_STRING_SEARCH_BACKWARDS].location; if (pos == OF_NOT_FOUND) { *category = @""; *key = path; |
︙ | ︙ |
Modified src/OFKernelEventObserver.m from [2c737f6572] to [58babda954].
︙ | ︙ | |||
217 218 219 220 221 222 223 | bool foundInReadBuffer = false; for (id object in _readObjects) { void *pool = objc_autoreleasePoolPush(); if ([object isKindOfClass: [OFStream class]] && [object hasDataInReadBuffer] && | | | 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | bool foundInReadBuffer = false; for (id object in _readObjects) { void *pool = objc_autoreleasePoolPush(); if ([object isKindOfClass: [OFStream class]] && [object hasDataInReadBuffer] && ![(OFStream *)object of_isWaitingForDelimiter]) { if ([_delegate respondsToSelector: @selector(objectIsReadyForReading:)]) [_delegate objectIsReadyForReading: object]; foundInReadBuffer = true; } |
︙ | ︙ |
Modified src/OFLHAArchive.m from [a8a54167d4] to [493061fab4].
︙ | ︙ | |||
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | #import "OFInvalidArgumentException.h" #import "OFNotImplementedException.h" #import "OFNotOpenException.h" #import "OFOutOfRangeException.h" #import "OFTruncatedDataException.h" #import "OFWriteFailedException.h" @interface OFLHAArchiveFileReadStream: OFStream <OFReadyForReadingObserving> { OFStream *_stream, *_decompressedStream; OFLHAArchiveEntry *_entry; uint32_t _toRead, _bytesConsumed; uint16_t _CRC16; bool _atEndOfStream, _skipped; } - (instancetype)of_initWithStream: (OFStream *)stream entry: (OFLHAArchiveEntry *)entry; - (void)of_skip; @end @interface OFLHAArchiveFileWriteStream: OFStream <OFReadyForWritingObserving> { OFMutableLHAArchiveEntry *_entry; of_string_encoding_t _encoding; OFSeekableStream *_stream; of_offset_t _headerOffset; uint32_t _bytesWritten; | > > | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | #import "OFInvalidArgumentException.h" #import "OFNotImplementedException.h" #import "OFNotOpenException.h" #import "OFOutOfRangeException.h" #import "OFTruncatedDataException.h" #import "OFWriteFailedException.h" OF_DIRECT_MEMBERS @interface OFLHAArchiveFileReadStream: OFStream <OFReadyForReadingObserving> { OFStream *_stream, *_decompressedStream; OFLHAArchiveEntry *_entry; uint32_t _toRead, _bytesConsumed; uint16_t _CRC16; bool _atEndOfStream, _skipped; } - (instancetype)of_initWithStream: (OFStream *)stream entry: (OFLHAArchiveEntry *)entry; - (void)of_skip; @end OF_DIRECT_MEMBERS @interface OFLHAArchiveFileWriteStream: OFStream <OFReadyForWritingObserving> { OFMutableLHAArchiveEntry *_entry; of_string_encoding_t _encoding; OFSeekableStream *_stream; of_offset_t _headerOffset; uint32_t _bytesWritten; |
︙ | ︙ |
Modified src/OFLHAArchiveEntry+Private.h from [4be7606365] to [085a1438c0].
︙ | ︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * file. */ #import "OFLHAArchive.h" OF_ASSUME_NONNULL_BEGIN @interface OFLHAArchiveEntry () - (instancetype)of_initWithHeader: (char [_Nonnull 21])header stream: (OFStream *)stream encoding: (of_string_encoding_t)encoding OF_METHOD_FAMILY(init); - (void)of_writeToStream: (OFStream *)stream encoding: (of_string_encoding_t)encoding; | > | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | * file. */ #import "OFLHAArchive.h" OF_ASSUME_NONNULL_BEGIN OF_DIRECT_MEMBERS @interface OFLHAArchiveEntry () - (instancetype)of_initWithHeader: (char [_Nonnull 21])header stream: (OFStream *)stream encoding: (of_string_encoding_t)encoding OF_METHOD_FAMILY(init); - (void)of_writeToStream: (OFStream *)stream encoding: (of_string_encoding_t)encoding; |
︙ | ︙ |
Modified src/OFLHADecompressingStream.h from [83e1abd175] to [cc62626ce1].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #import "OFStream.h" OF_ASSUME_NONNULL_BEGIN #define OF_LHA_DECOMPRESSING_STREAM_BUFFER_SIZE 4096 @interface OFLHADecompressingStream: OFStream { OFStream *_stream; uint8_t _distanceBits, _dictionaryBits; unsigned char _buffer[OF_LHA_DECOMPRESSING_STREAM_BUFFER_SIZE]; uint32_t _bytesConsumed; uint16_t _bufferIndex, _bufferLength; | > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #import "OFStream.h" OF_ASSUME_NONNULL_BEGIN #define OF_LHA_DECOMPRESSING_STREAM_BUFFER_SIZE 4096 OF_DIRECT_MEMBERS @interface OFLHADecompressingStream: OFStream { OFStream *_stream; uint8_t _distanceBits, _dictionaryBits; unsigned char _buffer[OF_LHA_DECOMPRESSING_STREAM_BUFFER_SIZE]; uint32_t _bytesConsumed; uint16_t _bufferIndex, _bufferLength; |
︙ | ︙ |
Modified src/OFList.m from [8f702bf74a] to [58e8774a64].
︙ | ︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #import "OFString.h" #import "OFXMLElement.h" #import "OFArray.h" #import "OFEnumerationMutationException.h" #import "OFInvalidArgumentException.h" @interface OFListEnumerator: OFEnumerator { OFList *_list; of_list_object_t *_Nullable _current; unsigned long _mutations; unsigned long *_Nullable _mutationsPtr; } | > | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #import "OFString.h" #import "OFXMLElement.h" #import "OFArray.h" #import "OFEnumerationMutationException.h" #import "OFInvalidArgumentException.h" OF_DIRECT_MEMBERS @interface OFListEnumerator: OFEnumerator { OFList *_list; of_list_object_t *_Nullable _current; unsigned long _mutations; unsigned long *_Nullable _mutationsPtr; } |
︙ | ︙ |
Modified src/OFMD5Hash.m from [4a0afb099d] to [f7acc8c4b8].
︙ | ︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #import "OFHashAlreadyCalculatedException.h" #import "OFOutOfRangeException.h" #define DIGEST_SIZE 16 #define BLOCK_SIZE 64 @interface OFMD5Hash () - (void)of_resetState; @end #define F(a, b, c) (((a) & (b)) | (~(a) & (c))) #define G(a, b, c) (((a) & (c)) | ((b) & ~(c))) #define H(a, b, c) ((a) ^ (b) ^ (c)) | > | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #import "OFHashAlreadyCalculatedException.h" #import "OFOutOfRangeException.h" #define DIGEST_SIZE 16 #define BLOCK_SIZE 64 OF_DIRECT_MEMBERS @interface OFMD5Hash () - (void)of_resetState; @end #define F(a, b, c) (((a) & (b)) | (~(a) & (c))) #define G(a, b, c) (((a) & (c)) | ((b) & ~(c))) #define H(a, b, c) ((a) ^ (b) ^ (c)) |
︙ | ︙ |
Modified src/OFMapTable+Private.h from [fcec305650] to [1364bfeb16].
︙ | ︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * file. */ #import "OFMapTable.h" OF_ASSUME_NONNULL_BEGIN @interface OFMapTableEnumeratorWrapper: OFEnumerator { OFMapTableEnumerator *_enumerator; id _object; } - (instancetype)initWithEnumerator: (OFMapTableEnumerator *)enumerator | > | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | * file. */ #import "OFMapTable.h" OF_ASSUME_NONNULL_BEGIN OF_DIRECT_MEMBERS @interface OFMapTableEnumeratorWrapper: OFEnumerator { OFMapTableEnumerator *_enumerator; id _object; } - (instancetype)initWithEnumerator: (OFMapTableEnumerator *)enumerator |
︙ | ︙ |
Modified src/OFMapTable.m from [df5b78cbf7] to [8ca8ae429a].
︙ | ︙ | |||
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | static bool defaultEqual(void *object1, void *object2) { return (object1 == object2); } @interface OFMapTable () - (void)of_setObject: (void *)object forKey: (void *)key hash: (uint32_t)hash; @end @interface OFMapTableEnumerator () - (instancetype)of_initWithMapTable: (OFMapTable *)mapTable buckets: (struct of_map_table_bucket **)buckets capacity: (uint32_t)capacity mutationsPointer: (unsigned long *)mutationsPtr OF_METHOD_FAMILY(init); @end | > > | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | static bool defaultEqual(void *object1, void *object2) { return (object1 == object2); } OF_DIRECT_MEMBERS @interface OFMapTable () - (void)of_setObject: (void *)object forKey: (void *)key hash: (uint32_t)hash; @end OF_DIRECT_MEMBERS @interface OFMapTableEnumerator () - (instancetype)of_initWithMapTable: (OFMapTable *)mapTable buckets: (struct of_map_table_bucket **)buckets capacity: (uint32_t)capacity mutationsPointer: (unsigned long *)mutationsPtr OF_METHOD_FAMILY(init); @end |
︙ | ︙ | |||
289 290 291 292 293 294 295 | if (_keyFunctions.equal(_buckets[i]->key, key)) return _buckets[i]->object; } return NULL; } | | | 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 | if (_keyFunctions.equal(_buckets[i]->key, key)) return _buckets[i]->object; } return NULL; } - (void)of_resizeForCount: (uint32_t)count OF_DIRECT { uint32_t fullness, capacity; struct of_map_table_bucket **buckets; if (count > UINT32_MAX / sizeof(*_buckets) || count > UINT32_MAX / 8) @throw [OFOutOfRangeException exception]; |
︙ | ︙ |
Modified src/OFMutableString.m from [3e022bac69] to [bb86d6b9da].
︙ | ︙ | |||
231 232 233 234 235 236 237 | return [super alloc]; } #ifdef OF_HAVE_UNICODE_TABLES - (void)of_convertWithWordStartTable: (const of_unichar_t *const [])startTable wordMiddleTable: (const of_unichar_t *const [])middleTable wordStartTableSize: (size_t)startTableSize | | | 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | return [super alloc]; } #ifdef OF_HAVE_UNICODE_TABLES - (void)of_convertWithWordStartTable: (const of_unichar_t *const [])startTable wordMiddleTable: (const of_unichar_t *const [])middleTable wordStartTableSize: (size_t)startTableSize wordMiddleTableSize: (size_t)middleTableSize OF_DIRECT { void *pool = objc_autoreleasePoolPush(); const of_unichar_t *characters = self.characters; size_t length = self.length; bool isStart = true; for (size_t i = 0; i < length; i++) { |
︙ | ︙ | |||
263 264 265 266 267 268 269 270 271 272 273 274 275 276 | } objc_autoreleasePoolPop(pool); } #else - (void)of_convertWithWordStartFunction: (char (*)(char))startFunction wordMiddleFunction: (char (*)(char))middleFunction { void *pool = objc_autoreleasePoolPush(); const of_unichar_t *characters = self.characters; size_t length = self.length; bool isStart = true; for (size_t i = 0; i < length; i++) { | > | 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | } objc_autoreleasePoolPop(pool); } #else - (void)of_convertWithWordStartFunction: (char (*)(char))startFunction wordMiddleFunction: (char (*)(char))middleFunction OF_DIRECT { void *pool = objc_autoreleasePoolPush(); const of_unichar_t *characters = self.characters; size_t length = self.length; bool isStart = true; for (size_t i = 0; i < length; i++) { |
︙ | ︙ |
Modified src/OFMutableUTF8String.m from [88e7b0c06e] to [cb57991be9].
︙ | ︙ | |||
69 70 71 72 73 74 75 | return self; } - (void)of_convertWithWordStartTable: (const of_unichar_t *const[])startTable wordMiddleTable: (const of_unichar_t *const[])middleTable wordStartTableSize: (size_t)startTableSize | | | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | return self; } - (void)of_convertWithWordStartTable: (const of_unichar_t *const[])startTable wordMiddleTable: (const of_unichar_t *const[])middleTable wordStartTableSize: (size_t)startTableSize wordMiddleTableSize: (size_t)middleTableSize OF_DIRECT { of_unichar_t *unicodeString; size_t unicodeLen, newCStringLength; size_t i, j; char *newCString; bool isStart = true; |
︙ | ︙ |
Modified src/OFPollKernelEventObserver.m from [49ee878680] to [5ca69d7bfc].
︙ | ︙ | |||
67 68 69 70 71 72 73 | [_FDs release]; [super dealloc]; } - (void)of_addObject: (id)object fileDescriptor: (int)fd | | | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | [_FDs release]; [super dealloc]; } - (void)of_addObject: (id)object fileDescriptor: (int)fd events: (short)events OF_DIRECT { struct pollfd *FDs; size_t count; bool found; if (fd < 0) @throw [OFObserveFailedException exceptionWithObserver: self |
︙ | ︙ | |||
106 107 108 109 110 111 112 | _FDToObject[fd] = object; [_FDs addItem: &p]; } } - (void)of_removeObject: (id)object fileDescriptor: (int)fd | | | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | _FDToObject[fd] = object; [_FDs addItem: &p]; } } - (void)of_removeObject: (id)object fileDescriptor: (int)fd events: (short)events OF_DIRECT { struct pollfd *FDs; size_t nFDs; if (fd < 0) @throw [OFObserveFailedException exceptionWithObserver: self errNo: EBADF]; |
︙ | ︙ |
Modified src/OFRIPEMD160Hash.m from [cf17c7c508] to [f5c31d29f5].
︙ | ︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #import "OFHashAlreadyCalculatedException.h" #import "OFOutOfRangeException.h" #define DIGEST_SIZE 20 #define BLOCK_SIZE 64 @interface OFRIPEMD160Hash () - (void)of_resetState; @end #define F(a, b, c) ((a) ^ (b) ^ (c)) #define G(a, b, c) (((a) & (b)) | (~(a) & (c))) #define H(a, b, c) (((a) | ~(b)) ^ (c)) | > | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #import "OFHashAlreadyCalculatedException.h" #import "OFOutOfRangeException.h" #define DIGEST_SIZE 20 #define BLOCK_SIZE 64 OF_DIRECT_MEMBERS @interface OFRIPEMD160Hash () - (void)of_resetState; @end #define F(a, b, c) ((a) ^ (b) ^ (c)) #define G(a, b, c) (((a) & (b)) | (~(a) & (c))) #define H(a, b, c) (((a) | ~(b)) ^ (c)) |
︙ | ︙ |
Modified src/OFRunLoop+Private.h from [f46c29fa91] to [979d7c9f7e].
︙ | ︙ | |||
29 30 31 32 33 34 35 36 37 38 39 40 41 42 | @protocol OFRunLoopConnectDelegate <OFObject> - (void)of_socketDidConnect: (id)socket exception: (nullable id)exception; - (id)of_connectionFailedExceptionForErrNo: (int)errNo; @end #endif @interface OFRunLoop () + (void)of_setMainRunLoop: (OFRunLoop *)runLoop; #ifdef OF_HAVE_SOCKETS + (void)of_addAsyncReadForStream: (OFStream <OFReadyForReadingObserving> *) stream buffer: (void *)buffer length: (size_t)length | > | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | @protocol OFRunLoopConnectDelegate <OFObject> - (void)of_socketDidConnect: (id)socket exception: (nullable id)exception; - (id)of_connectionFailedExceptionForErrNo: (int)errNo; @end #endif OF_DIRECT_MEMBERS @interface OFRunLoop () + (void)of_setMainRunLoop: (OFRunLoop *)runLoop; #ifdef OF_HAVE_SOCKETS + (void)of_addAsyncReadForStream: (OFStream <OFReadyForReadingObserving> *) stream buffer: (void *)buffer length: (size_t)length |
︙ | ︙ |
Modified src/OFRunLoop.m from [1ed99b4d7a] to [ae4dcb6d52].
︙ | ︙ | |||
74 75 76 77 78 79 80 81 82 83 84 85 86 87 | # ifdef OF_HAVE_THREADS OFMutex *_execSignalsMutex; # endif #endif } @end @interface OFRunLoop () - (OFRunLoopState *)of_stateForMode: (of_run_loop_mode_t)mode create: (bool)create; @end #ifdef OF_HAVE_SOCKETS @interface OFRunLoopQueueItem: OFObject | > | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | # ifdef OF_HAVE_THREADS OFMutex *_execSignalsMutex; # endif #endif } @end OF_DIRECT_MEMBERS @interface OFRunLoop () - (OFRunLoopState *)of_stateForMode: (of_run_loop_mode_t)mode create: (bool)create; @end #ifdef OF_HAVE_SOCKETS @interface OFRunLoopQueueItem: OFObject |
︙ | ︙ |
Modified src/OFSHA1Hash.m from [744ef1090a] to [cfb97974cb].
︙ | ︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #import "OFHashAlreadyCalculatedException.h" #import "OFOutOfRangeException.h" #define DIGEST_SIZE 20 #define BLOCK_SIZE 64 @interface OFSHA1Hash () - (void)of_resetState; @end #define F(a, b, c, d) ((d) ^ ((b) & ((c) ^ (d)))) #define G(a, b, c, d) ((b) ^ (c) ^ (d)) #define H(a, b, c, d) (((b) & (c)) | ((d) & ((b) | (c)))) | > | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #import "OFHashAlreadyCalculatedException.h" #import "OFOutOfRangeException.h" #define DIGEST_SIZE 20 #define BLOCK_SIZE 64 OF_DIRECT_MEMBERS @interface OFSHA1Hash () - (void)of_resetState; @end #define F(a, b, c, d) ((d) ^ ((b) & ((c) ^ (d)))) #define G(a, b, c, d) ((b) ^ (c) ^ (d)) #define H(a, b, c, d) (((b) & (c)) | ((d) & ((b) | (c)))) |
︙ | ︙ |
Modified src/OFSHA224Or256Hash.m from [4e2317a38c] to [86f8d9edad].
︙ | ︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #import "OFSecureData.h" #import "OFHashAlreadyCalculatedException.h" #import "OFOutOfRangeException.h" #define BLOCK_SIZE 64 @interface OFSHA224Or256Hash () - (void)of_resetState; @end static const uint32_t table[] = { 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, | > | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #import "OFSecureData.h" #import "OFHashAlreadyCalculatedException.h" #import "OFOutOfRangeException.h" #define BLOCK_SIZE 64 OF_DIRECT_MEMBERS @interface OFSHA224Or256Hash () - (void)of_resetState; @end static const uint32_t table[] = { 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, |
︙ | ︙ |
Modified src/OFSHA384Or512Hash.m from [2e85a85b06] to [d2c6b72c05].
︙ | ︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #import "OFSecureData.h" #import "OFHashAlreadyCalculatedException.h" #import "OFOutOfRangeException.h" #define BLOCK_SIZE 128 @interface OFSHA384Or512Hash () - (void)of_resetState; @end static const uint64_t table[] = { 0x428A2F98D728AE22, 0x7137449123EF65CD, 0xB5C0FBCFEC4D3B2F, 0xE9B5DBA58189DBBC, 0x3956C25BF348B538, 0x59F111F1B605D019, | > | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #import "OFSecureData.h" #import "OFHashAlreadyCalculatedException.h" #import "OFOutOfRangeException.h" #define BLOCK_SIZE 128 OF_DIRECT_MEMBERS @interface OFSHA384Or512Hash () - (void)of_resetState; @end static const uint64_t table[] = { 0x428A2F98D728AE22, 0x7137449123EF65CD, 0xB5C0FBCFEC4D3B2F, 0xE9B5DBA58189DBBC, 0x3956C25BF348B538, 0x59F111F1B605D019, |
︙ | ︙ |
Modified src/OFSPXSocket.m from [9940cead8b] to [c3e334ddfc].
︙ | ︙ | |||
41 42 43 44 45 46 47 48 49 50 51 52 53 54 | - (int)of_createSocketForAddress: (const of_socket_address_t *)address errNo: (int *)errNo; - (bool)of_connectSocketToAddress: (const of_socket_address_t *)address errNo: (int *)errNo; - (void)of_closeSocket; @end @interface OFSPXSocketAsyncConnectDelegate: OFObject <OFRunLoopConnectDelegate> { OFSPXSocket *_socket; unsigned char _node[IPX_NODE_LEN]; uint32_t _network; uint16_t _port; #ifdef OF_HAVE_BLOCKS | > | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | - (int)of_createSocketForAddress: (const of_socket_address_t *)address errNo: (int *)errNo; - (bool)of_connectSocketToAddress: (const of_socket_address_t *)address errNo: (int *)errNo; - (void)of_closeSocket; @end OF_DIRECT_MEMBERS @interface OFSPXSocketAsyncConnectDelegate: OFObject <OFRunLoopConnectDelegate> { OFSPXSocket *_socket; unsigned char _node[IPX_NODE_LEN]; uint32_t _network; uint16_t _port; #ifdef OF_HAVE_BLOCKS |
︙ | ︙ |
Modified src/OFSPXStreamSocket.m from [cb1a9316c7] to [fcd6269f1f].
︙ | ︙ | |||
41 42 43 44 45 46 47 48 49 50 51 52 53 54 | - (int)of_createSocketForAddress: (const of_socket_address_t *)address errNo: (int *)errNo; - (bool)of_connectSocketToAddress: (const of_socket_address_t *)address errNo: (int *)errNo; - (void)of_closeSocket; @end @interface OFSPXStreamSocketAsyncConnectDelegate: OFObject <OFRunLoopConnectDelegate> { OFSPXStreamSocket *_socket; unsigned char _node[IPX_NODE_LEN]; uint32_t _network; uint16_t _port; | > | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | - (int)of_createSocketForAddress: (const of_socket_address_t *)address errNo: (int *)errNo; - (bool)of_connectSocketToAddress: (const of_socket_address_t *)address errNo: (int *)errNo; - (void)of_closeSocket; @end OF_DIRECT_MEMBERS @interface OFSPXStreamSocketAsyncConnectDelegate: OFObject <OFRunLoopConnectDelegate> { OFSPXStreamSocket *_socket; unsigned char _node[IPX_NODE_LEN]; uint32_t _network; uint16_t _port; |
︙ | ︙ |
Modified src/OFStdIOStream+Private.h from [f49b4a7fef] to [c5d65c7b40].
︙ | ︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * file. */ #import "OFStdIOStream.h" OF_ASSUME_NONNULL_BEGIN @interface OFStdIOStream () #ifndef OF_AMIGAOS - (instancetype)of_initWithFileDescriptor: (int)fd OF_METHOD_FAMILY(init); #else - (instancetype)of_initWithHandle: (BPTR)handle closable: (bool)closable OF_METHOD_FAMILY(init); #endif | > | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | * file. */ #import "OFStdIOStream.h" OF_ASSUME_NONNULL_BEGIN OF_DIRECT_MEMBERS @interface OFStdIOStream () #ifndef OF_AMIGAOS - (instancetype)of_initWithFileDescriptor: (int)fd OF_METHOD_FAMILY(init); #else - (instancetype)of_initWithHandle: (BPTR)handle closable: (bool)closable OF_METHOD_FAMILY(init); #endif |
︙ | ︙ |
Modified src/OFStream+Private.h from [81ef70d19a] to [55a5b86424].
︙ | ︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 | * file. */ #import "OFStream.h" OF_ASSUME_NONNULL_BEGIN @interface OFStream () @property (readonly, nonatomic, getter=of_isWaitingForDelimiter) bool of_waitingForDelimiter; @end OF_ASSUME_NONNULL_END | > | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * file. */ #import "OFStream.h" OF_ASSUME_NONNULL_BEGIN OF_DIRECT_MEMBERS @interface OFStream () @property (readonly, nonatomic, getter=of_isWaitingForDelimiter) bool of_waitingForDelimiter; @end OF_ASSUME_NONNULL_END |
Modified src/OFString.m from [9bf92ef7e1] to [bbe1776206].
︙ | ︙ | |||
80 81 82 83 84 85 86 87 88 89 90 91 92 93 | Class isa; } placeholder; #if defined(HAVE_STRTOF_L) || defined(HAVE_STRTOD_L) static locale_t cLocale; #endif @interface OFString () - (size_t)of_getCString: (char *)cString maxLength: (size_t)maxLength encoding: (of_string_encoding_t)encoding lossy: (bool)lossy; - (const char *)of_cStringWithEncoding: (of_string_encoding_t)encoding lossy: (bool)lossy; | > | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | Class isa; } placeholder; #if defined(HAVE_STRTOF_L) || defined(HAVE_STRTOD_L) static locale_t cLocale; #endif OF_DIRECT_MEMBERS @interface OFString () - (size_t)of_getCString: (char *)cString maxLength: (size_t)maxLength encoding: (of_string_encoding_t)encoding lossy: (bool)lossy; - (const char *)of_cStringWithEncoding: (of_string_encoding_t)encoding lossy: (bool)lossy; |
︙ | ︙ | |||
372 373 374 375 376 377 378 | - (instancetype)init { return (id)[[OFUTF8String alloc] init]; } - (instancetype)initWithUTF8String: (const char *)UTF8String { | | | | 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 | - (instancetype)init { return (id)[[OFUTF8String alloc] init]; } - (instancetype)initWithUTF8String: (const char *)UTF8String { OFUTF8String *string; size_t length; void *storage; length = strlen(UTF8String); string = of_alloc_object([OFUTF8String class], length + 1, 1, &storage); return (id)[string of_initWithUTF8String: UTF8String length: length storage: storage]; } - (instancetype)initWithUTF8String: (const char *)UTF8String length: (size_t)UTF8StringLength { OFUTF8String *string; void *storage; string = of_alloc_object([OFUTF8String class], UTF8StringLength + 1, 1, &storage); return (id)[string of_initWithUTF8String: UTF8String length: UTF8StringLength |
︙ | ︙ | |||
420 421 422 423 424 425 426 | freeWhenDone: freeWhenDone]; } - (instancetype)initWithCString: (const char *)cString encoding: (of_string_encoding_t)encoding { if (encoding == OF_STRING_ENCODING_UTF_8) { | | | 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 | freeWhenDone: freeWhenDone]; } - (instancetype)initWithCString: (const char *)cString encoding: (of_string_encoding_t)encoding { if (encoding == OF_STRING_ENCODING_UTF_8) { OFUTF8String *string; size_t length; void *storage; length = strlen(cString); string = of_alloc_object([OFUTF8String class], length + 1, 1, &storage); |
︙ | ︙ | |||
442 443 444 445 446 447 448 | } - (instancetype)initWithCString: (const char *)cString encoding: (of_string_encoding_t)encoding length: (size_t)cStringLength { if (encoding == OF_STRING_ENCODING_UTF_8) { | | | 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 | } - (instancetype)initWithCString: (const char *)cString encoding: (of_string_encoding_t)encoding length: (size_t)cStringLength { if (encoding == OF_STRING_ENCODING_UTF_8) { OFUTF8String *string; void *storage; string = of_alloc_object([OFUTF8String class], cStringLength + 1, 1, &storage); return (id)[string of_initWithUTF8String: cString length: cStringLength |
︙ | ︙ |
Modified src/OFTarArchive.m from [74012ab28d] to [22d3bc898d].
︙ | ︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFNotOpenException.h" #import "OFOutOfRangeException.h" #import "OFTruncatedDataException.h" #import "OFWriteFailedException.h" @interface OFTarArchiveFileReadStream: OFStream <OFReadyForReadingObserving> { OFTarArchiveEntry *_entry; OFStream *_stream; uint64_t _toRead; bool _atEndOfStream, _skipped; } - (instancetype)of_initWithStream: (OFStream *)stream entry: (OFTarArchiveEntry *)entry; - (void)of_skip; @end @interface OFTarArchiveFileWriteStream: OFStream <OFReadyForWritingObserving> { OFTarArchiveEntry *_entry; OFStream *_stream; uint64_t _toWrite; } | > > | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFNotOpenException.h" #import "OFOutOfRangeException.h" #import "OFTruncatedDataException.h" #import "OFWriteFailedException.h" OF_DIRECT_MEMBERS @interface OFTarArchiveFileReadStream: OFStream <OFReadyForReadingObserving> { OFTarArchiveEntry *_entry; OFStream *_stream; uint64_t _toRead; bool _atEndOfStream, _skipped; } - (instancetype)of_initWithStream: (OFStream *)stream entry: (OFTarArchiveEntry *)entry; - (void)of_skip; @end OF_DIRECT_MEMBERS @interface OFTarArchiveFileWriteStream: OFStream <OFReadyForWritingObserving> { OFTarArchiveEntry *_entry; OFStream *_stream; uint64_t _toWrite; } |
︙ | ︙ |
Modified src/OFTarArchiveEntry+Private.h from [b3f653d2b2] to [13ddd96cdf].
︙ | ︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #import "OFTarArchiveEntry.h" #import "OFString.h" OF_ASSUME_NONNULL_BEGIN @class OFStream; @interface OFTarArchiveEntry () - (instancetype)of_initWithHeader: (unsigned char [_Nonnull 512])header encoding: (of_string_encoding_t)encoding OF_METHOD_FAMILY(init); - (void)of_writeToStream: (OFStream *)stream encoding: (of_string_encoding_t)encoding; @end | > | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #import "OFTarArchiveEntry.h" #import "OFString.h" OF_ASSUME_NONNULL_BEGIN @class OFStream; OF_DIRECT_MEMBERS @interface OFTarArchiveEntry () - (instancetype)of_initWithHeader: (unsigned char [_Nonnull 512])header encoding: (of_string_encoding_t)encoding OF_METHOD_FAMILY(init); - (void)of_writeToStream: (OFStream *)stream encoding: (of_string_encoding_t)encoding; @end |
︙ | ︙ |
Modified src/OFThread+Private.h from [5617fb7048] to [5ab3745dfa].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 | */ #import "OFThread.h" OF_ASSUME_NONNULL_BEGIN #ifdef OF_HAVE_THREADS @interface OFThread () + (void)of_createMainThread; @end #endif OF_ASSUME_NONNULL_END | > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | */ #import "OFThread.h" OF_ASSUME_NONNULL_BEGIN #ifdef OF_HAVE_THREADS OF_DIRECT_MEMBERS @interface OFThread () + (void)of_createMainThread; @end #endif OF_ASSUME_NONNULL_END |
Modified src/OFThreadPool.m from [246b1b023f] to [29bc99edba].
︙ | ︙ | |||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #import "OFThreadPool.h" #import "OFArray.h" #import "OFList.h" #import "OFThread.h" #import "OFCondition.h" #import "OFSystemInfo.h" @interface OFThreadPoolJob: OFObject { id _target; SEL _selector; id _object; #ifdef OF_HAVE_BLOCKS of_thread_pool_block_t _block; | > | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | #import "OFThreadPool.h" #import "OFArray.h" #import "OFList.h" #import "OFThread.h" #import "OFCondition.h" #import "OFSystemInfo.h" OF_DIRECT_MEMBERS @interface OFThreadPoolJob: OFObject { id _target; SEL _selector; id _object; #ifdef OF_HAVE_BLOCKS of_thread_pool_block_t _block; |
︙ | ︙ | |||
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | else #endif [_target performSelector: _selector withObject: _object]; } @end @interface OFThreadPoolThread: OFThread { OFList *_queue; OFCondition *_queueCondition, *_countCondition; @public volatile bool _terminate; volatile int *_doneCount; } + (instancetype)threadWithThreadPool: (OFThreadPool *)threadPool; - (instancetype)initWithThreadPool: (OFThreadPool *)threadPool; @end @implementation OFThreadPoolThread + (instancetype)threadWithThreadPool: (OFThreadPool *)threadPool { | > > | | 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | else #endif [_target performSelector: _selector withObject: _object]; } @end OF_DIRECT_MEMBERS @interface OFThreadPoolThread: OFThread { OFList *_queue; OFCondition *_queueCondition, *_countCondition; @public volatile bool _terminate; volatile int *_doneCount; } + (instancetype)threadWithThreadPool: (OFThreadPool *)threadPool; - (instancetype)initWithThreadPool: (OFThreadPool *)threadPool; @end @implementation OFThreadPoolThread + (instancetype)threadWithThreadPool: (OFThreadPool *)threadPool { return [[(OFThreadPoolThread *)[self alloc] initWithThreadPool: threadPool] autorelease]; } - (instancetype)initWithThreadPool: (OFThreadPool *)threadPool { self = [super init]; @try { |
︙ | ︙ | |||
293 294 295 296 297 298 299 | [_queue release]; [_queueCondition release]; [_countCondition release]; [super dealloc]; } | | | 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | [_queue release]; [_queueCondition release]; [_countCondition release]; [super dealloc]; } - (void)of_dispatchJob: (OFThreadPoolJob *)job OF_DIRECT { [_countCondition lock]; _count++; [_countCondition unlock]; [_queueCondition lock]; @try { |
︙ | ︙ |
Modified src/OFTimer+Private.h from [89cdf956f3] to [3bdcab087f].
︙ | ︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 | * file. */ #import "OFTimer.h" OF_ASSUME_NONNULL_BEGIN @interface OFTimer () - (void)of_setInRunLoop: (nullable OFRunLoop *)runLoop mode: (nullable of_run_loop_mode_t)mode; @end OF_ASSUME_NONNULL_END | > | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * file. */ #import "OFTimer.h" OF_ASSUME_NONNULL_BEGIN OF_DIRECT_MEMBERS @interface OFTimer () - (void)of_setInRunLoop: (nullable OFRunLoop *)runLoop mode: (nullable of_run_loop_mode_t)mode; @end OF_ASSUME_NONNULL_END |
Modified src/OFTimer.m from [51ddf396b5] to [ced46435b5].
︙ | ︙ | |||
325 326 327 328 329 330 331 | target: (id)target selector: (SEL)selector object: (id)object1 object: (id)object2 object: (id)object3 object: (id)object4 arguments: (uint8_t)arguments | | > | 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | target: (id)target selector: (SEL)selector object: (id)object1 object: (id)object2 object: (id)object3 object: (id)object4 arguments: (uint8_t)arguments repeats: (bool)repeats OF_METHOD_FAMILY(init) OF_DIRECT { self = [super init]; @try { _fireDate = [fireDate retain]; _interval = interval; _target = [target retain]; |
︙ | ︙ |
Modified src/OFUDPSocket+Private.h from [cc4f2c83e7] to [bc60d66b62].
︙ | ︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 | * file. */ #import "OFUDPSocket.h" OF_ASSUME_NONNULL_BEGIN @interface OFUDPSocket () - (uint16_t)of_bindToAddress: (of_socket_address_t *)address extraType: (int)extraType; @end OF_ASSUME_NONNULL_END | > | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * file. */ #import "OFUDPSocket.h" OF_ASSUME_NONNULL_BEGIN OF_DIRECT_MEMBERS @interface OFUDPSocket () - (uint16_t)of_bindToAddress: (of_socket_address_t *)address extraType: (int)extraType; @end OF_ASSUME_NONNULL_END |
Modified src/OFUDPSocket.m from [851b1788ef] to [8b135fcca2].
︙ | ︙ | |||
35 36 37 38 39 40 41 | #import "socket.h" #import "socket_helpers.h" @implementation OFUDPSocket @dynamic delegate; - (uint16_t)of_bindToAddress: (of_socket_address_t *)address | | | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | #import "socket.h" #import "socket_helpers.h" @implementation OFUDPSocket @dynamic delegate; - (uint16_t)of_bindToAddress: (of_socket_address_t *)address extraType: (int)extraType OF_DIRECT { void *pool = objc_autoreleasePoolPush(); OFString *host; uint16_t port; #if SOCK_CLOEXEC == 0 && defined(HAVE_FCNTL) && defined(FD_CLOEXEC) int flags; #endif |
︙ | ︙ |
Modified src/OFURL.m from [71131960ae] to [2524e037d6].
︙ | ︙ | |||
83 84 85 86 87 88 89 90 91 92 93 94 95 96 | static void initURLQueryOrFragmentAllowedCharacterSet(void) { URLQueryOrFragmentAllowedCharacterSet = [[OFURLQueryOrFragmentAllowedCharacterSet alloc] init]; } @interface OFInvertedCharacterSetWithoutPercent: OFCharacterSet { OFCharacterSet *_characterSet; bool (*_characterIsMember)(id, SEL, of_unichar_t); } - (instancetype)initWithCharacterSet: (OFCharacterSet *)characterSet; | > | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | static void initURLQueryOrFragmentAllowedCharacterSet(void) { URLQueryOrFragmentAllowedCharacterSet = [[OFURLQueryOrFragmentAllowedCharacterSet alloc] init]; } OF_DIRECT_MEMBERS @interface OFInvertedCharacterSetWithoutPercent: OFCharacterSet { OFCharacterSet *_characterSet; bool (*_characterIsMember)(id, SEL, of_unichar_t); } - (instancetype)initWithCharacterSet: (OFCharacterSet *)characterSet; |
︙ | ︙ |
Modified src/OFUTF8String+Private.h from [d056e7820f] to [03f2449d2e].
︙ | ︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * file. */ #import "OFUTF8String.h" OF_ASSUME_NONNULL_BEGIN @interface OFUTF8String () - (instancetype)of_initWithUTF8String: (const char *)UTF8String length: (size_t)UTF8StringLength storage: (char *)storage OF_METHOD_FAMILY(init); @end OF_ASSUME_NONNULL_END | > | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | * file. */ #import "OFUTF8String.h" OF_ASSUME_NONNULL_BEGIN OF_DIRECT_MEMBERS @interface OFUTF8String () - (instancetype)of_initWithUTF8String: (const char *)UTF8String length: (size_t)UTF8StringLength storage: (char *)storage OF_METHOD_FAMILY(init); @end OF_ASSUME_NONNULL_END |
Modified src/OFWindowsRegistryKey.m from [adb04f0d00] to [db8bc56ab6].
︙ | ︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 | #import "OFGetWindowsRegistryValueFailedException.h" #import "OFInvalidEncodingException.h" #import "OFInvalidFormatException.h" #import "OFOpenWindowsRegistryKeyFailedException.h" #import "OFOutOfRangeException.h" #import "OFSetWindowsRegistryValueFailedException.h" @interface OFWindowsRegistryKey () - (instancetype)of_initWithHKey: (HKEY)hKey close: (bool)close; @end @implementation OFWindowsRegistryKey + (instancetype)classesRootKey | > | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | #import "OFGetWindowsRegistryValueFailedException.h" #import "OFInvalidEncodingException.h" #import "OFInvalidFormatException.h" #import "OFOpenWindowsRegistryKeyFailedException.h" #import "OFOutOfRangeException.h" #import "OFSetWindowsRegistryValueFailedException.h" OF_DIRECT_MEMBERS @interface OFWindowsRegistryKey () - (instancetype)of_initWithHKey: (HKEY)hKey close: (bool)close; @end @implementation OFWindowsRegistryKey + (instancetype)classesRootKey |
︙ | ︙ |
Modified src/OFXMLElement.m from [5b4791734b] to [a8d9602939].
︙ | ︙ | |||
424 425 426 427 428 429 430 | return ret; } - (OFString *)of_XMLStringWithParent: (OFXMLElement *)parent namespaces: (OFDictionary *)allNamespaces indentation: (unsigned int)indentation | | | 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 | return ret; } - (OFString *)of_XMLStringWithParent: (OFXMLElement *)parent namespaces: (OFDictionary *)allNamespaces indentation: (unsigned int)indentation level: (unsigned int)level OF_DIRECT { void *pool; char *cString; size_t length, i; OFString *prefix, *parentPrefix; OFString *ret; OFString *defaultNS; |
︙ | ︙ |
Modified src/OFZIPArchive.m from [bebc27a315] to [6d9893fc0c].
︙ | ︙ | |||
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 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | /* * FIXME: Current limitations: * - Split archives are not supported. * - Encrypted files cannot be read. */ @interface OFZIPArchive () - (void)of_readZIPInfo; - (void)of_readEntries; - (void)of_closeLastReturnedStream; - (void)of_writeCentralDirectory; @end @interface OFZIPArchiveLocalFileHeader: OFObject { @public uint16_t _minVersionNeeded, _generalPurposeBitFlag, _compressionMethod; uint16_t _lastModifiedFileTime, _lastModifiedFileDate; uint32_t _CRC32; uint64_t _compressedSize, _uncompressedSize; OFString *_fileName; OFData *_extraField; } - (instancetype)initWithStream: (OFStream *)stream; - (bool)matchesEntry: (OFZIPArchiveEntry *)entry; @end @interface OFZIPArchiveFileReadStream: OFStream { OFStream *_stream, *_decompressedStream; OFZIPArchiveEntry *_entry; uint64_t _toRead; uint32_t _CRC32; bool _atEndOfStream; } - (instancetype)of_initWithStream: (OFStream *)stream entry: (OFZIPArchiveEntry *)entry; @end @interface OFZIPArchiveFileWriteStream: OFStream { OFStream *_stream; uint32_t _CRC32; @public int64_t _bytesWritten; OFMutableZIPArchiveEntry *_entry; | > > > > | 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 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 | /* * FIXME: Current limitations: * - Split archives are not supported. * - Encrypted files cannot be read. */ OF_DIRECT_MEMBERS @interface OFZIPArchive () - (void)of_readZIPInfo; - (void)of_readEntries; - (void)of_closeLastReturnedStream; - (void)of_writeCentralDirectory; @end OF_DIRECT_MEMBERS @interface OFZIPArchiveLocalFileHeader: OFObject { @public uint16_t _minVersionNeeded, _generalPurposeBitFlag, _compressionMethod; uint16_t _lastModifiedFileTime, _lastModifiedFileDate; uint32_t _CRC32; uint64_t _compressedSize, _uncompressedSize; OFString *_fileName; OFData *_extraField; } - (instancetype)initWithStream: (OFStream *)stream; - (bool)matchesEntry: (OFZIPArchiveEntry *)entry; @end OF_DIRECT_MEMBERS @interface OFZIPArchiveFileReadStream: OFStream { OFStream *_stream, *_decompressedStream; OFZIPArchiveEntry *_entry; uint64_t _toRead; uint32_t _CRC32; bool _atEndOfStream; } - (instancetype)of_initWithStream: (OFStream *)stream entry: (OFZIPArchiveEntry *)entry; @end OF_DIRECT_MEMBERS @interface OFZIPArchiveFileWriteStream: OFStream { OFStream *_stream; uint32_t _CRC32; @public int64_t _bytesWritten; OFMutableZIPArchiveEntry *_entry; |
︙ | ︙ |
Modified src/OFZIPArchiveEntry+Private.h from [4c3ba1613a] to [19e5b08dac].
︙ | ︙ | |||
20 21 22 23 24 25 26 | OF_ASSUME_NONNULL_BEGIN @interface OFZIPArchiveEntry () @property (readonly, nonatomic) uint16_t of_lastModifiedFileTime, of_lastModifiedFileDate; @property (readonly, nonatomic) int64_t of_localFileHeaderOffset; | | > | | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | OF_ASSUME_NONNULL_BEGIN @interface OFZIPArchiveEntry () @property (readonly, nonatomic) uint16_t of_lastModifiedFileTime, of_lastModifiedFileDate; @property (readonly, nonatomic) int64_t of_localFileHeaderOffset; - (instancetype)of_initWithStream: (OFStream *)stream OF_METHOD_FAMILY(init) OF_DIRECT; - (uint64_t)of_writeToStream: (OFStream *)stream OF_DIRECT; @end @interface OFMutableZIPArchiveEntry () @property (readwrite, nonatomic, setter=of_setLocalFileHeaderOffset:) int64_t of_localFileHeaderOffset; @end |
︙ | ︙ |