Comment: | Reduce ivar scopes |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
e0a330b3777d3e317bd19c02b9b82f48 |
User & Date: | js on 2019-09-29 20:53:32 |
Other Links: | manifest | tags |
2019-09-30
| ||
21:27 | Don't reserve ivars for class clusters check-in: 1a9f18064e user: js tags: trunk | |
2019-09-29
| ||
20:53 | Reduce ivar scopes check-in: e0a330b377 user: js tags: trunk | |
19:48 | Documentation fixes check-in: 3be624ded9 user: js tags: trunk | |
Modified src/OFAdjacentArray.h from [cebe5ad233] to [6f24e09a18].
︙ | ︙ | |||
17 18 19 20 21 22 23 | #import "OFArray.h" OF_ASSUME_NONNULL_BEGIN @class OFMutableData; | < | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #import "OFArray.h" OF_ASSUME_NONNULL_BEGIN @class OFMutableData; @interface OFAdjacentArray: OFArray { OFMutableData *_array; } @end OF_ASSUME_NONNULL_END |
Modified src/OFAdjacentSubarray.h from [bd17bec51a] to [089d0764c2].
︙ | ︙ | |||
15 16 17 18 19 20 21 | * file. */ #import "OFSubarray.h" OF_ASSUME_NONNULL_BEGIN | < | 15 16 17 18 19 20 21 22 23 24 25 | * file. */ #import "OFSubarray.h" OF_ASSUME_NONNULL_BEGIN @interface OFAdjacentSubarray: OFSubarray @end OF_ASSUME_NONNULL_END |
Modified src/OFApplication.h from [93b516bfa0] to [1ecf36756b].
︙ | ︙ | |||
126 127 128 129 130 131 132 | @interface OFApplication: OFObject { OFString *_programName; OFArray OF_GENERIC(OFString *) *_arguments; OFMutableDictionary OF_GENERIC(OFString *, OFString *) *_environment; int *_argc; char ***_argv; | < < < | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | @interface OFApplication: OFObject { OFString *_programName; OFArray OF_GENERIC(OFString *) *_arguments; OFMutableDictionary OF_GENERIC(OFString *, OFString *) *_environment; int *_argc; char ***_argv; id <OFApplicationDelegate> _Nullable _delegate; void (*_Nullable _SIGINTHandler)(id, SEL); #ifndef OF_WINDOWS void (*_Nullable _SIGHUPHandler)(id, SEL); void (*_Nullable _SIGUSR1Handler)(id, SEL); void (*_Nullable _SIGUSR2Handler)(id, SEL); #endif |
︙ | ︙ |
Modified src/OFApplication.m from [c0cd7cc60a] to [641d94e4fd].
︙ | ︙ | |||
13 14 15 16 17 18 19 | * 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. */ #include "config.h" | < < | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | * 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. */ #include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <signal.h> |
︙ | ︙ | |||
97 98 99 100 101 102 103 | [delegate release]; #if defined(OF_HAVE_THREADS) && defined(OF_HAVE_SOCKETS) && defined(OF_AMIGAOS) of_socket_deinit(); #endif } | < < < < < < < < < < < < < < < < < < < | 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | [delegate release]; #if defined(OF_HAVE_THREADS) && defined(OF_HAVE_SOCKETS) && defined(OF_AMIGAOS) of_socket_deinit(); #endif } int of_application_main(int *argc, char **argv[], id <OFApplicationDelegate> delegate) { #ifdef OF_WINDOWS wchar_t **wargv, **wenvp; int wargc, si = 0; |
︙ | ︙ | |||
154 155 156 157 158 159 160 161 162 163 164 165 166 167 | @implementation OFApplication @synthesize programName = _programName, arguments = _arguments; @synthesize environment = _environment; #ifdef OF_HAVE_SANDBOX @synthesize activeSandbox = _activeSandbox; @synthesize activeSandboxForChildProcesses = _activeSandboxForChildProcesses; #endif + (OFApplication *)sharedApplication { return app; } + (OFString *)programName | > > > > > > > > > > > > > > > > > > > | 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | @implementation OFApplication @synthesize programName = _programName, arguments = _arguments; @synthesize environment = _environment; #ifdef OF_HAVE_SANDBOX @synthesize activeSandbox = _activeSandbox; @synthesize activeSandboxForChildProcesses = _activeSandboxForChildProcesses; #endif #define SIGNAL_HANDLER(signal) \ static void \ handle##signal(int sig) \ { \ app->_##signal##Handler(app->_delegate, \ @selector(applicationDidReceive##signal)); \ } SIGNAL_HANDLER(SIGINT) #ifdef SIGHUP SIGNAL_HANDLER(SIGHUP) #endif #ifdef SIGUSR1 SIGNAL_HANDLER(SIGUSR1) #endif #ifdef SIGUSR2 SIGNAL_HANDLER(SIGUSR2) #endif #undef SIGNAL_HANDLER + (OFApplication *)sharedApplication { return app; } + (OFString *)programName |
︙ | ︙ |
Added src/OFArray+Private.h version [a806faad1b].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 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 | /* * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, * 2018, 2019 * Jonathan Schleifer <js@heap.zone> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in * the packaging of this file. * * 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 "OFArray.h" OF_ASSUME_NONNULL_BEGIN @interface OFArrayEnumerator: OFEnumerator { OFArray *_array; size_t _count; unsigned long _mutations; unsigned long *_Nullable _mutationsPtr; size_t _position; } - (instancetype)initWithArray: (OFArray *)data mutationsPtr: (nullable unsigned long *)mutationsPtr; @end OF_ASSUME_NONNULL_END |
Modified src/OFArray.h from [72663abff1] to [5c29d52144].
︙ | ︙ | |||
492 493 494 495 496 497 498 | - (nullable id)foldUsingBlock: (of_array_fold_block_t)block; #endif #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) # undef ObjectType #endif @end | < < < < < < < < < < < < < | 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 | - (nullable id)foldUsingBlock: (of_array_fold_block_t)block; #endif #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) # undef ObjectType #endif @end OF_ASSUME_NONNULL_END #import "OFMutableArray.h" #if !defined(NSINTEGER_DEFINED) && !__has_feature(modules) /* Required for array literals to work */ @compatibility_alias NSArray OFArray; #endif |
Modified src/OFArray.m from [b12c539371] to [9bb6a6b4d8].
︙ | ︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #include <stdarg.h> #include <stdlib.h> #include <assert.h> #import "OFArray.h" #import "OFAdjacentArray.h" #import "OFData.h" #import "OFNull.h" #import "OFString.h" #import "OFSubarray.h" #import "OFXMLElement.h" | > | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #include <stdarg.h> #include <stdlib.h> #include <assert.h> #import "OFArray.h" #import "OFArray+Private.h" #import "OFAdjacentArray.h" #import "OFData.h" #import "OFNull.h" #import "OFString.h" #import "OFSubarray.h" #import "OFXMLElement.h" |
︙ | ︙ |
Modified src/OFBitSetCharacterSet.h from [0f5e448e50] to [354358342b].
︙ | ︙ | |||
15 16 17 18 19 20 21 | * file. */ #import "OFCharacterSet.h" OF_ASSUME_NONNULL_BEGIN | < | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | * file. */ #import "OFCharacterSet.h" OF_ASSUME_NONNULL_BEGIN @interface OFBitSetCharacterSet: OFCharacterSet { unsigned char *_bitset; size_t _size; } @end OF_ASSUME_NONNULL_END |
Modified src/OFBytesValue.h from [12d8c96477] to [064f02062a].
︙ | ︙ | |||
15 16 17 18 19 20 21 | * file. */ #import "OFValue.h" OF_ASSUME_NONNULL_BEGIN | < | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | * file. */ #import "OFValue.h" OF_ASSUME_NONNULL_BEGIN @interface OFBytesValue: OFValue { size_t _size; void *_bytes; const char *_objCType; } @end OF_ASSUME_NONNULL_END |
Modified src/OFCountedMapTableSet.h from [54cdfe273c] to [425da1187b].
︙ | ︙ | |||
17 18 19 20 21 22 23 | #import "OFCountedSet.h" OF_ASSUME_NONNULL_BEGIN @class OFMapTable; | < | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #import "OFCountedSet.h" OF_ASSUME_NONNULL_BEGIN @class OFMapTable; @interface OFCountedMapTableSet: OFCountedSet { OFMapTable *_mapTable; } @end OF_ASSUME_NONNULL_END |
Modified src/OFData.h from [75aaa591fe] to [1fc3a52fe5].
︙ | ︙ | |||
38 39 40 41 42 43 44 45 46 47 48 49 50 51 | */ @interface OFData: OFObject <OFCopying, OFMutableCopying, OFComparing, OFSerialization, OFMessagePackRepresentation> { unsigned char *_items; size_t _count, _itemSize; bool _freeWhenDone; OFData *_parentData; OF_RESERVE_IVARS(4) } /*! * @brief The size of a single item in the OFData in bytes. */ | > | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | */ @interface OFData: OFObject <OFCopying, OFMutableCopying, OFComparing, OFSerialization, OFMessagePackRepresentation> { unsigned char *_items; size_t _count, _itemSize; bool _freeWhenDone; @private OFData *_parentData; OF_RESERVE_IVARS(4) } /*! * @brief The size of a single item in the OFData in bytes. */ |
︙ | ︙ |
Modified src/OFDimensionValue.h from [4f99589b0d] to [506e11e7af].
︙ | ︙ | |||
15 16 17 18 19 20 21 | * file. */ #import "OFValue.h" OF_ASSUME_NONNULL_BEGIN | < | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * file. */ #import "OFValue.h" OF_ASSUME_NONNULL_BEGIN @interface OFDimensionValue: OFValue { of_dimension_t _dimension; } @end OF_ASSUME_NONNULL_END |
Modified src/OFEpollKernelEventObserver.h from [82f0a9bae6] to [a52cc0d821].
︙ | ︙ | |||
17 18 19 20 21 22 23 | #import "OFKernelEventObserver.h" OF_ASSUME_NONNULL_BEGIN @class OFMapTable; | < | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #import "OFKernelEventObserver.h" OF_ASSUME_NONNULL_BEGIN @class OFMapTable; @interface OFEpollKernelEventObserver: OFKernelEventObserver { int _epfd; OFMapTable *_FDToEvents; } @end OF_ASSUME_NONNULL_END |
Modified src/OFFileURLHandler.h from [fd0c855548] to [4c8d0c729e].
︙ | ︙ | |||
15 16 17 18 19 20 21 | * file. */ #import "OFURLHandler.h" OF_ASSUME_NONNULL_BEGIN | < | 15 16 17 18 19 20 21 22 23 24 25 26 | * file. */ #import "OFURLHandler.h" OF_ASSUME_NONNULL_BEGIN @interface OFFileURLHandler: OFURLHandler + (bool)of_directoryExistsAtPath: (OFString *)path; @end OF_ASSUME_NONNULL_END |
Modified src/OFHTTPURLHandler.h from [8c0000bba5] to [9220399ab4].
︙ | ︙ | |||
15 16 17 18 19 20 21 | * file. */ #import "OFURLHandler.h" OF_ASSUME_NONNULL_BEGIN | < | 15 16 17 18 19 20 21 22 23 24 25 | * file. */ #import "OFURLHandler.h" OF_ASSUME_NONNULL_BEGIN @interface OFHTTPURLHandler: OFURLHandler @end OF_ASSUME_NONNULL_END |
Modified src/OFINIFileSettings.h from [bae8a4f75c] to [0f40811c1f].
︙ | ︙ | |||
18 19 20 21 22 23 24 | #import "OFSettings.h" OF_ASSUME_NONNULL_BEGIN @class OFString; @class OFINIFile; | < | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #import "OFSettings.h" OF_ASSUME_NONNULL_BEGIN @class OFString; @class OFINIFile; @interface OFINIFileSettings: OFSettings { OFString *_filePath; OFINIFile *_INIFile; } @end OF_ASSUME_NONNULL_END |
Modified src/OFInflate64Stream.h from [7497e2c385] to [1e8b3531bf].
︙ | ︙ | |||
30 31 32 33 34 35 36 | * * @brief A class that handles Deflate decompression transparently for an * underlying stream. */ OF_SUBCLASSING_RESTRICTED @interface OFInflate64Stream: OFStream <OFReadyForReadingObserving> { | < < < | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | * * @brief A class that handles Deflate decompression transparently for an * underlying stream. */ OF_SUBCLASSING_RESTRICTED @interface OFInflate64Stream: OFStream <OFReadyForReadingObserving> { OFStream *_stream; unsigned char _buffer[OF_INFLATE64_STREAM_BUFFER_SIZE]; uint16_t _bufferIndex, _bufferLength; uint8_t _byte; uint8_t _bitIndex, _savedBitsLength; uint16_t _savedBits; unsigned char *_Nullable _slidingWindow; |
︙ | ︙ |
Modified src/OFInflateStream.h from [a451ce0366] to [56ded0c782].
︙ | ︙ | |||
30 31 32 33 34 35 36 | * * @brief A class that handles Deflate decompression transparently for an * underlying stream. */ OF_SUBCLASSING_RESTRICTED @interface OFInflateStream: OFStream <OFReadyForReadingObserving> { | < < < | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | * * @brief A class that handles Deflate decompression transparently for an * underlying stream. */ OF_SUBCLASSING_RESTRICTED @interface OFInflateStream: OFStream <OFReadyForReadingObserving> { OFStream *_stream; unsigned char _buffer[OF_INFLATE_STREAM_BUFFER_SIZE]; uint16_t _bufferIndex, _bufferLength; uint8_t _byte; uint8_t _bitIndex, _savedBitsLength; uint16_t _savedBits; unsigned char *_Nullable _slidingWindow; |
︙ | ︙ |
Modified src/OFInflateStream.m from [5b9953e18a] to [2d02df5db2].
︙ | ︙ | |||
11 12 13 14 15 16 17 | * * 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. */ | < < | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | * * 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. */ #include "config.h" #include <stdlib.h> #include <string.h> #include <assert.h> |
︙ | ︙ | |||
102 103 104 105 106 107 108 109 110 111 112 113 114 115 | }; #endif static const uint8_t codeLengthsOrder[19] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }; static struct of_huffman_tree *fixedLitLenTree, *fixedDistTree; static OF_INLINE bool tryReadBits(OFInflateStream *stream, uint16_t *bits, uint8_t count) { uint16_t ret = stream->_savedBits; assert(stream->_savedBitsLength < count); | > | 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | }; #endif static const uint8_t codeLengthsOrder[19] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }; static struct of_huffman_tree *fixedLitLenTree, *fixedDistTree; @implementation OFInflateStream static OF_INLINE bool tryReadBits(OFInflateStream *stream, uint16_t *bits, uint8_t count) { uint16_t ret = stream->_savedBits; assert(stream->_savedBitsLength < count); |
︙ | ︙ | |||
144 145 146 147 148 149 150 | stream->_savedBits = 0; stream->_savedBitsLength = 0; *bits = ret; return true; } | < | 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | stream->_savedBits = 0; stream->_savedBitsLength = 0; *bits = ret; return true; } + (void)initialize { uint8_t lengths[288]; if (self != [OFInflateStream class]) return; |
︙ | ︙ |
Modified src/OFInvertedCharacterSet.h from [1f748d556a] to [e78ee993d6].
︙ | ︙ | |||
15 16 17 18 19 20 21 | * file. */ #import "OFCharacterSet.h" OF_ASSUME_NONNULL_BEGIN | < | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | * file. */ #import "OFCharacterSet.h" OF_ASSUME_NONNULL_BEGIN @interface OFInvertedCharacterSet: OFCharacterSet { OFCharacterSet *_characterSet; bool (*_characterIsMember)(id, SEL, of_unichar_t); } - (instancetype)of_initWithCharacterSet: (OFCharacterSet *)characterSet OF_METHOD_FAMILY(init); @end OF_ASSUME_NONNULL_END |
Modified src/OFKernelEventObserver.h from [b2d4e300e7] to [1f89c2433c].
︙ | ︙ | |||
129 130 131 132 133 134 135 | #elif defined(OF_AMIGAOS) struct Task *_waitingTask; ULONG _cancelSignal; #else of_socket_t _cancelFD[2]; struct sockaddr_in _cancelAddr; #endif | | | > | | | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | #elif defined(OF_AMIGAOS) struct Task *_waitingTask; ULONG _cancelSignal; #else of_socket_t _cancelFD[2]; struct sockaddr_in _cancelAddr; #endif #ifdef OF_AMIGAOS ULONG _execSignalMask; #endif @private OFMutableData *_queueActions; OFMutableArray *_queueObjects; #ifdef OF_HAVE_THREADS OFMutex *_mutex; #endif OF_RESERVE_IVARS(4) } /*! * @brief The delegate for the OFKernelEventObserver. */ |
︙ | ︙ |
Modified src/OFKqueueKernelEventObserver.h from [04d72570f9] to [93173a129b].
︙ | ︙ | |||
17 18 19 20 21 22 23 | #import "OFKernelEventObserver.h" OF_ASSUME_NONNULL_BEGIN @class OFMutableArray OF_GENERIC(ObjectType); | < | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #import "OFKernelEventObserver.h" OF_ASSUME_NONNULL_BEGIN @class OFMutableArray OF_GENERIC(ObjectType); @interface OFKqueueKernelEventObserver: OFKernelEventObserver { int _kernelQueue; } @end OF_ASSUME_NONNULL_END |
Modified src/OFLHAArchive.m from [e91adc15fc] to [e8d8679991].
︙ | ︙ | |||
385 386 387 388 389 390 391 | if ([_decompressedStream isKindOfClass: [OFLHADecompressingStream class]]) { OFLHADecompressingStream *decompressingStream = (OFLHADecompressingStream *)_decompressedStream; [decompressingStream close]; toRead = | | | 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 | if ([_decompressedStream isKindOfClass: [OFLHADecompressingStream class]]) { OFLHADecompressingStream *decompressingStream = (OFLHADecompressingStream *)_decompressedStream; [decompressingStream close]; toRead = _entry.compressedSize - decompressingStream.bytesConsumed; stream = _stream; } if ([stream isKindOfClass: [OFSeekableStream class]] && (sizeof(of_offset_t) > 4 || toRead < INT32_MAX)) [(OFSeekableStream *)stream seekToOffset: (of_offset_t)toRead |
︙ | ︙ |
Modified src/OFLHAArchiveEntry.h from [a2fc14bd84] to [c6a8d0afe4].
︙ | ︙ | |||
29 30 31 32 33 34 35 | /*! * @class OFLHAArchiveEntry OFLHAArchiveEntry.h ObjFW/OFLHAArchiveEntry.h * * @brief A class which represents an entry in an LHA archive. */ @interface OFLHAArchiveEntry: OFObject <OFCopying, OFMutableCopying> { | < < < | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | /*! * @class OFLHAArchiveEntry OFLHAArchiveEntry.h ObjFW/OFLHAArchiveEntry.h * * @brief A class which represents an entry in an LHA archive. */ @interface OFLHAArchiveEntry: OFObject <OFCopying, OFMutableCopying> { OFString *_fileName, *_Nullable _directoryName, *_compressionMethod; uint32_t _compressedSize, _uncompressedSize; OFDate *_date; uint8_t _headerLevel; uint16_t _CRC16; uint8_t _operatingSystemIdentifier; OFString *_Nullable _fileComment; |
︙ | ︙ |
Modified src/OFLHAArchiveEntry.m from [436ef99699] to [f7b5894775].
︙ | ︙ | |||
13 14 15 16 17 18 19 | * 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. */ #include "config.h" | < < > | 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 43 44 45 | * 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. */ #include "config.h" #include <string.h> #import "OFLHAArchiveEntry.h" #import "OFLHAArchiveEntry+Private.h" #import "OFArray.h" #import "OFData.h" #import "OFDate.h" #import "OFNumber.h" #import "OFStream.h" #import "OFString.h" #import "crc16.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFOutOfRangeException.h" #import "OFUnsupportedVersionException.h" @implementation OFLHAArchiveEntry static OFDate * parseMSDOSDate(uint32_t MSDOSDate) { uint16_t year = ((MSDOSDate & 0xFE000000) >> 25) + 1980; uint8_t month = (MSDOSDate & 0x1E00000) >> 21; uint8_t day = (MSDOSDate & 0x1F); uint8_t hour = (MSDOSDate & 0xF800) >> 11; |
︙ | ︙ | |||
304 305 306 307 308 309 310 | *fileName = cString + pos; *fileNameLength = length - pos; *directoryName = cString; *directoryNameLength = pos; } | < | 303 304 305 306 307 308 309 310 311 312 313 314 315 316 | *fileName = cString + pos; *fileNameLength = length - pos; *directoryName = cString; *directoryNameLength = pos; } + (instancetype)entryWithFileName: (OFString *)fileName { return [[[self alloc] initWithFileName: fileName] autorelease]; } - (instancetype)init { |
︙ | ︙ |
Modified src/OFLHADecompressingStream.h from [e5a15c8e0b] to [f3042223df].
︙ | ︙ | |||
17 18 19 20 21 22 23 | #import "OFStream.h" OF_ASSUME_NONNULL_BEGIN #define OF_LHA_DECOMPRESSING_STREAM_BUFFER_SIZE 4096 | < < > > | 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 48 49 50 51 52 53 54 | #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; uint8_t _byte; uint8_t _bitIndex, _savedBitsLength; uint16_t _savedBits; unsigned char *_slidingWindow; uint32_t _slidingWindowIndex, _slidingWindowMask; int _state; uint16_t _symbolsLeft; struct of_huffman_tree *_Nullable _codeLenTree, *_Nullable _litLenTree; struct of_huffman_tree *_Nullable _distTree, *_Nullable _treeIter; uint16_t _codesCount, _codesReceived; bool _currentIsExtendedLength, _skip; uint8_t *_Nullable _codesLengths; uint16_t _length; uint32_t _distance; } @property (nonatomic, readonly) uint32_t bytesConsumed; - (instancetype)of_initWithStream: (OFStream *)stream distanceBits: (uint8_t)distanceBits dictionaryBits: (uint8_t)dictionaryBits; @end OF_ASSUME_NONNULL_END |
Modified src/OFLHADecompressingStream.m from [3f3861d786] to [4bb7cbcba0].
︙ | ︙ | |||
40 41 42 43 44 45 46 47 48 49 50 51 52 53 | STATE_DIST_TREE_SINGLE, STATE_BLOCK_LITLEN, STATE_BLOCK_DIST_LENGTH, STATE_BLOCK_DIST_LENGTH_EXTRA, STATE_BLOCK_LEN_DIST_PAIR }; static OF_INLINE bool tryReadBits(OFLHADecompressingStream *stream, uint16_t *bits, uint8_t count) { uint16_t ret = stream->_savedBits; assert(stream->_savedBitsLength < count); | > > > | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | STATE_DIST_TREE_SINGLE, STATE_BLOCK_LITLEN, STATE_BLOCK_DIST_LENGTH, STATE_BLOCK_DIST_LENGTH_EXTRA, STATE_BLOCK_LEN_DIST_PAIR }; @implementation OFLHADecompressingStream @synthesize bytesConsumed = _bytesConsumed; static OF_INLINE bool tryReadBits(OFLHADecompressingStream *stream, uint16_t *bits, uint8_t count) { uint16_t ret = stream->_savedBits; assert(stream->_savedBitsLength < count); |
︙ | ︙ | |||
87 88 89 90 91 92 93 | stream->_savedBits = 0; stream->_savedBitsLength = 0; *bits = ret; return true; } | < | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | stream->_savedBits = 0; stream->_savedBitsLength = 0; *bits = ret; return true; } - (instancetype)of_initWithStream: (OFStream *)stream distanceBits: (uint8_t)distanceBits dictionaryBits: (uint8_t)dictionaryBits { self = [super init]; @try { |
︙ | ︙ |
Modified src/OFList.h from [c1be030244] to [4ff6f82ebc].
︙ | ︙ | |||
169 170 171 172 173 174 175 | */ - (void)removeAllObjects; #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) # undef ObjectType #endif @end | < < < < < < < < < < < < | 169 170 171 172 173 174 175 176 | */ - (void)removeAllObjects; #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) # undef ObjectType #endif @end OF_ASSUME_NONNULL_END |
Modified src/OFList.m from [146f486f61] to [60f4af0c33].
︙ | ︙ | |||
23 24 25 26 27 28 29 30 31 32 33 34 35 36 | #import "OFList.h" #import "OFString.h" #import "OFXMLElement.h" #import "OFArray.h" #import "OFEnumerationMutationException.h" #import "OFInvalidArgumentException.h" @implementation OFList @synthesize firstListObject = _firstListObject; @synthesize lastListObject = _lastListObject; + (instancetype)list { | > > > > > > > > > > > > | 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 48 | #import "OFList.h" #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; } - (instancetype)initWithList: (OFList *)list mutationsPointer: (unsigned long *)mutationsPtr; @end @implementation OFList @synthesize firstListObject = _firstListObject; @synthesize lastListObject = _lastListObject; + (instancetype)list { |
︙ | ︙ |
Modified src/OFMapTableDictionary.h from [e4b08c07d4] to [c6f471998e].
︙ | ︙ | |||
18 19 20 21 22 23 24 | #import "OFDictionary.h" OF_ASSUME_NONNULL_BEGIN @class OFMapTable; @class OFMapTableEnumerator; | < | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #import "OFDictionary.h" OF_ASSUME_NONNULL_BEGIN @class OFMapTable; @class OFMapTableEnumerator; @interface OFMapTableDictionary: OFDictionary { OFMapTable *_mapTable; } - (instancetype)initWithCapacity: (size_t)capacity; @end OF_ASSUME_NONNULL_END |
Modified src/OFMapTableSet.h from [87db5f22c7] to [955e132003].
︙ | ︙ | |||
17 18 19 20 21 22 23 | #import "OFSet.h" OF_ASSUME_NONNULL_BEGIN @class OFMapTable; | < | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #import "OFSet.h" OF_ASSUME_NONNULL_BEGIN @class OFMapTable; @interface OFMapTableSet: OFSet { OFMapTable *_mapTable; } - (instancetype)initWithCapacity: (size_t)capacity; @end OF_ASSUME_NONNULL_END |
Modified src/OFMutableAdjacentArray.h from [51288ab7a0] to [ba9ae1bdf2].
︙ | ︙ | |||
17 18 19 20 21 22 23 | #import "OFArray.h" OF_ASSUME_NONNULL_BEGIN @class OFMutableData; | < | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #import "OFArray.h" OF_ASSUME_NONNULL_BEGIN @class OFMutableData; @interface OFMutableAdjacentArray: OFMutableArray { OFMutableData *_array; unsigned long _mutations; } @end OF_ASSUME_NONNULL_END |
Modified src/OFMutableAdjacentArray.m from [41904cfc7c] to [5f88adbbe0].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include "config.h" #include <string.h> #import "OFMutableAdjacentArray.h" #import "OFAdjacentArray.h" #import "OFData.h" #import "OFEnumerationMutationException.h" #import "OFInvalidArgumentException.h" #import "OFOutOfRangeException.h" @implementation OFMutableAdjacentArray | > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #include <string.h> #import "OFMutableAdjacentArray.h" #import "OFAdjacentArray.h" #import "OFArray+Private.h" #import "OFData.h" #import "OFEnumerationMutationException.h" #import "OFInvalidArgumentException.h" #import "OFOutOfRangeException.h" @implementation OFMutableAdjacentArray |
︙ | ︙ |
Modified src/OFMutableMapTableDictionary.h from [4d2fb14c64] to [dec5e52f1e].
︙ | ︙ | |||
17 18 19 20 21 22 23 | #import "OFDictionary.h" OF_ASSUME_NONNULL_BEGIN @class OFMapTable; | < | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #import "OFDictionary.h" OF_ASSUME_NONNULL_BEGIN @class OFMapTable; @interface OFMutableMapTableDictionary: OFMutableDictionary { OFMapTable *_mapTable; } @end OF_ASSUME_NONNULL_END |
Modified src/OFMutableMapTableSet.h from [184041bad3] to [59911fabdb].
︙ | ︙ | |||
17 18 19 20 21 22 23 | #import "OFMutableSet.h" OF_ASSUME_NONNULL_BEGIN @class OFMapTable; | < | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #import "OFMutableSet.h" OF_ASSUME_NONNULL_BEGIN @class OFMapTable; @interface OFMutableMapTableSet: OFMutableSet { OFMapTable *_mapTable; } @end OF_ASSUME_NONNULL_END |
Modified src/OFMutableUTF8String.h from [bde0a714b5] to [2bea88fa1e].
︙ | ︙ | |||
16 17 18 19 20 21 22 | */ #import "OFMutableString.h" #import "OFUTF8String.h" OF_ASSUME_NONNULL_BEGIN | < < | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | */ #import "OFMutableString.h" #import "OFUTF8String.h" OF_ASSUME_NONNULL_BEGIN @interface OFMutableUTF8String: OFMutableString { struct of_string_utf8_ivars *restrict _s; struct of_string_utf8_ivars _storage; } @end OF_ASSUME_NONNULL_END |
Modified src/OFMutableUTF8String.m from [e22aad1130] to [3bd226f623].
︙ | ︙ | |||
372 373 374 375 376 377 378 | _s->cStringLength += UTF8StringLength; _s->length += string.length; _s->cString[_s->cStringLength] = 0; if ([string isKindOfClass: [OFUTF8String class]] || [string isKindOfClass: [OFMutableUTF8String class]]) { | | | 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 | _s->cStringLength += UTF8StringLength; _s->length += string.length; _s->cString[_s->cStringLength] = 0; if ([string isKindOfClass: [OFUTF8String class]] || [string isKindOfClass: [OFMutableUTF8String class]]) { if (((OFMutableUTF8String *)string)->_s->isUTF8) _s->isUTF8 = true; } else _s->isUTF8 = true; } - (void)appendCharacters: (const of_unichar_t *)characters length: (size_t)length |
︙ | ︙ | |||
547 548 549 550 551 552 553 | _s->cString[newCStringLength] = '\0'; _s->cStringLength = newCStringLength; _s->length += string.length; if ([string isKindOfClass: [OFUTF8String class]] || [string isKindOfClass: [OFMutableUTF8String class]]) { | | | 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 | _s->cString[newCStringLength] = '\0'; _s->cStringLength = newCStringLength; _s->length += string.length; if ([string isKindOfClass: [OFUTF8String class]] || [string isKindOfClass: [OFMutableUTF8String class]]) { if (((OFMutableUTF8String *)string)->_s->isUTF8) _s->isUTF8 = true; } else _s->isUTF8 = true; } - (void)deleteCharactersInRange: (of_range_t)range { |
︙ | ︙ | |||
640 641 642 643 644 645 646 | size: newCStringLength + 1]; _s->cStringLength = newCStringLength; _s->length = newLength; if ([replacement isKindOfClass: [OFUTF8String class]] || [replacement isKindOfClass: [OFMutableUTF8String class]]) { | | | 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 | size: newCStringLength + 1]; _s->cStringLength = newCStringLength; _s->length = newLength; if ([replacement isKindOfClass: [OFUTF8String class]] || [replacement isKindOfClass: [OFMutableUTF8String class]]) { if (((OFMutableUTF8String *)replacement)->_s->isUTF8) _s->isUTF8 = true; } else _s->isUTF8 = true; } - (void)replaceOccurrencesOfString: (OFString *)string withString: (OFString *)replacement |
︙ | ︙ | |||
727 728 729 730 731 732 733 | _s->hashed = false; _s->cString = newCString; _s->cStringLength = newCStringLength; _s->length = newLength; if ([replacement isKindOfClass: [OFUTF8String class]] || [replacement isKindOfClass: [OFMutableUTF8String class]]) { | | | 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 | _s->hashed = false; _s->cString = newCString; _s->cStringLength = newCStringLength; _s->length = newLength; if ([replacement isKindOfClass: [OFUTF8String class]] || [replacement isKindOfClass: [OFMutableUTF8String class]]) { if (((OFMutableUTF8String *)replacement)->_s->isUTF8) _s->isUTF8 = true; } else _s->isUTF8 = true; } - (void)deleteLeadingWhitespaces { |
︙ | ︙ |
Modified src/OFNonretainedObjectValue.h from [36f80cbb4e] to [c355b53946].
︙ | ︙ | |||
15 16 17 18 19 20 21 | * file. */ #import "OFValue.h" OF_ASSUME_NONNULL_BEGIN | < | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * file. */ #import "OFValue.h" OF_ASSUME_NONNULL_BEGIN @interface OFNonretainedObjectValue: OFValue { id _object; } @end OF_ASSUME_NONNULL_END |
Modified src/OFPlugin.h from [cb3a1304f8] to [ce507fec65].
︙ | ︙ | |||
36 37 38 39 40 41 42 | /*! * @class OFPlugin OFPlugin.h ObjFW/OFPlugin.h * * @brief Provides a system for loading plugins at runtime. */ @interface OFPlugin: OFObject { | | | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | /*! * @class OFPlugin OFPlugin.h ObjFW/OFPlugin.h * * @brief Provides a system for loading plugins at runtime. */ @interface OFPlugin: OFObject { of_plugin_handle_t _pluginHandle; OF_RESERVE_IVARS(4) } /*! * @brief Loads a plugin from a file. * * @param path Path to the plugin file. The suffix is appended automatically. |
︙ | ︙ |
Modified src/OFPlugin.m from [503261dce9] to [e6fd971342].
︙ | ︙ | |||
105 106 107 108 109 110 111 | initPlugin = (init_plugin_t)(uintptr_t)of_dlsym(handle, "init_plugin"); if (initPlugin == (init_plugin_t)0 || (plugin = initPlugin()) == nil) { of_dlclose(handle); @throw [OFInitializationFailedException exceptionWithClass: self]; } | | | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | initPlugin = (init_plugin_t)(uintptr_t)of_dlsym(handle, "init_plugin"); if (initPlugin == (init_plugin_t)0 || (plugin = initPlugin()) == nil) { of_dlclose(handle); @throw [OFInitializationFailedException exceptionWithClass: self]; } plugin->_pluginHandle = handle; return plugin; } - (instancetype)init { if ([self isMemberOfClass: [OFPlugin class]]) { @try { |
︙ | ︙ | |||
127 128 129 130 131 132 133 | } return [super init]; } - (void)dealloc { | | | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | } return [super init]; } - (void)dealloc { of_plugin_handle_t h = _pluginHandle; [super dealloc]; of_dlclose(h); } @end |
Modified src/OFPointValue.h from [88e07dfeed] to [ee56f0af65].
︙ | ︙ | |||
15 16 17 18 19 20 21 | * file. */ #import "OFValue.h" OF_ASSUME_NONNULL_BEGIN | < | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * file. */ #import "OFValue.h" OF_ASSUME_NONNULL_BEGIN @interface OFPointValue: OFValue { of_point_t _point; } @end OF_ASSUME_NONNULL_END |
Modified src/OFPointerValue.h from [bc4ae528fd] to [c394de6a61].
︙ | ︙ | |||
15 16 17 18 19 20 21 | * file. */ #import "OFValue.h" OF_ASSUME_NONNULL_BEGIN | < | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * file. */ #import "OFValue.h" OF_ASSUME_NONNULL_BEGIN @interface OFPointerValue: OFValue { void *_pointer; } @end OF_ASSUME_NONNULL_END |
Modified src/OFPollKernelEventObserver.h from [2770775881] to [aa8c14235f].
︙ | ︙ | |||
17 18 19 20 21 22 23 | #import "OFKernelEventObserver.h" OF_ASSUME_NONNULL_BEGIN @class OFMutableData; | < | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #import "OFKernelEventObserver.h" OF_ASSUME_NONNULL_BEGIN @class OFMutableData; @interface OFPollKernelEventObserver: OFKernelEventObserver { OFMutableData *_FDs; int _maxFD; id __unsafe_unretained *_FDToObject; } @end OF_ASSUME_NONNULL_END |
Modified src/OFRangeCharacterSet.h from [a2771ad1c7] to [d6286761a3].
︙ | ︙ | |||
15 16 17 18 19 20 21 | * file. */ #import "OFCharacterSet.h" OF_ASSUME_NONNULL_BEGIN | < | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * file. */ #import "OFCharacterSet.h" OF_ASSUME_NONNULL_BEGIN @interface OFRangeCharacterSet: OFCharacterSet { of_range_t _range; } @end OF_ASSUME_NONNULL_END |
Modified src/OFRangeValue.h from [a8ef163be5] to [485fced595].
︙ | ︙ | |||
15 16 17 18 19 20 21 | * file. */ #import "OFValue.h" OF_ASSUME_NONNULL_BEGIN | < | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * file. */ #import "OFValue.h" OF_ASSUME_NONNULL_BEGIN @interface OFRangeValue: OFValue { of_range_t _range; } @end OF_ASSUME_NONNULL_END |
Modified src/OFRectangleValue.h from [7066e1a221] to [e6635df87d].
︙ | ︙ | |||
15 16 17 18 19 20 21 | * file. */ #import "OFValue.h" OF_ASSUME_NONNULL_BEGIN | < | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * file. */ #import "OFValue.h" OF_ASSUME_NONNULL_BEGIN @interface OFRectangleValue: OFValue { of_rectangle_t _rectangle; } @end OF_ASSUME_NONNULL_END |
Modified src/OFSHA224Or256Hash.h from [6b1a277f58] to [e39de03a34].
︙ | ︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | /*! * @class OFSHA224Or256Hash OFSHA224Or256Hash.h ObjFW/OFSHA224Or256Hash.h * * @brief A base class for SHA-224 and SHA-256. */ @interface OFSHA224Or256Hash: OFObject <OFCryptoHash> { OFSecureData *_iVarsData; struct of_sha224_or_256_hash_ivars { uint32_t state[8]; uint64_t bits; union of_sha224_or_256_hash_buffer { uint8_t bytes[64]; uint32_t words[64]; } buffer; size_t bufferLength; } *_iVars; bool _calculated; OF_RESERVE_IVARS(4) } @end OF_ASSUME_NONNULL_END | > > > | 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 | /*! * @class OFSHA224Or256Hash OFSHA224Or256Hash.h ObjFW/OFSHA224Or256Hash.h * * @brief A base class for SHA-224 and SHA-256. */ @interface OFSHA224Or256Hash: OFObject <OFCryptoHash> { @private OFSecureData *_iVarsData; @protected struct of_sha224_or_256_hash_ivars { uint32_t state[8]; uint64_t bits; union of_sha224_or_256_hash_buffer { uint8_t bytes[64]; uint32_t words[64]; } buffer; size_t bufferLength; } *_iVars; @private bool _calculated; OF_RESERVE_IVARS(4) } @end OF_ASSUME_NONNULL_END |
Modified src/OFSHA384Or512Hash.h from [835b1d3d02] to [10ea7023d1].
︙ | ︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | /*! * @class OFSHA384Or512Hash OFSHA384Or512Hash.h ObjFW/OFSHA384Or512Hash.h * * @brief A base class for SHA-384 and SHA-512. */ @interface OFSHA384Or512Hash: OFObject <OFCryptoHash> { OFSecureData *_iVarsData; struct of_sha384_or_512_hash_ivars { uint64_t state[8]; uint64_t bits[2]; union of_sha384_or_512_hash_buffer { uint8_t bytes[128]; uint64_t words[80]; } buffer; size_t bufferLength; } *_iVars; bool _calculated; OF_RESERVE_IVARS(4) } @end OF_ASSUME_NONNULL_END | > > > | 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 | /*! * @class OFSHA384Or512Hash OFSHA384Or512Hash.h ObjFW/OFSHA384Or512Hash.h * * @brief A base class for SHA-384 and SHA-512. */ @interface OFSHA384Or512Hash: OFObject <OFCryptoHash> { @private OFSecureData *_iVarsData; @protected struct of_sha384_or_512_hash_ivars { uint64_t state[8]; uint64_t bits[2]; union of_sha384_or_512_hash_buffer { uint8_t bytes[128]; uint64_t words[80]; } buffer; size_t bufferLength; } *_iVars; @private bool _calculated; OF_RESERVE_IVARS(4) } @end OF_ASSUME_NONNULL_END |
Modified src/OFSelectKernelEventObserver.h from [e8ee327775] to [4637ad2ef9].
︙ | ︙ | |||
28 29 30 31 32 33 34 | # include <sys/select.h> #endif #import "OFKernelEventObserver.h" OF_ASSUME_NONNULL_BEGIN | < | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | # include <sys/select.h> #endif #import "OFKernelEventObserver.h" OF_ASSUME_NONNULL_BEGIN @interface OFSelectKernelEventObserver: OFKernelEventObserver { fd_set _readFDs, _writeFDs; int _maxFD; } @end OF_ASSUME_NONNULL_END |
Modified src/OFStream.h from [b92e531fc2] to [0663f8f188].
︙ | ︙ | |||
192 193 194 195 196 197 198 199 200 201 202 203 204 205 | * the methods that do the actual work. OFStream uses those for all other * methods and does all the caching and other stuff for you. If you * override these methods without the `lowlevel` prefix, you *will* break * caching and get broken results! */ @interface OFStream: OFObject <OFCopying> { #if !defined(OF_SEEKABLE_STREAM_M) && !defined(OF_TCP_SOCKET_M) @private #endif char *_Nullable _readBuffer, *_Nullable _readBufferMemory; char *_Nullable _writeBuffer; size_t _readBufferLength, _writeBufferLength; bool _writeBuffered, _waitingForDelimiter; | > > < < < | 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | * the methods that do the actual work. OFStream uses those for all other * methods and does all the caching and other stuff for you. If you * override these methods without the `lowlevel` prefix, you *will* break * caching and get broken results! */ @interface OFStream: OFObject <OFCopying> { bool _blocking; id _Nullable _delegate; #if !defined(OF_SEEKABLE_STREAM_M) && !defined(OF_TCP_SOCKET_M) @private #endif char *_Nullable _readBuffer, *_Nullable _readBufferMemory; char *_Nullable _writeBuffer; size_t _readBufferLength, _writeBufferLength; bool _writeBuffered, _waitingForDelimiter; OF_RESERVE_IVARS(4) } /*! * @brief Whether the end of the stream has been reached. */ @property (readonly, nonatomic, getter=isAtEndOfStream) bool atEndOfStream; |
︙ | ︙ |
Modified src/OFThread.h from [156e47b532] to [c31c7a3537].
︙ | ︙ | |||
61 62 63 64 65 66 67 | * This is so that the thread can be used as a key for a dictionary, * so context can be associated with a thread. */ @interface OFThread: OFObject #ifdef OF_HAVE_THREADS <OFCopying> { | < | < < < | 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 | * This is so that the thread can be used as a key for a dictionary, * so context can be associated with a thread. */ @interface OFThread: OFObject #ifdef OF_HAVE_THREADS <OFCopying> { @private of_thread_t _thread; of_thread_attr_t _attr; enum of_thread_running { OF_THREAD_NOT_RUNNING, OF_THREAD_RUNNING, OF_THREAD_WAITING_FOR_JOIN } _running; void *_pool; # ifdef OF_HAVE_BLOCKS of_thread_block_t _Nullable _threadBlock; # endif jmp_buf _exitEnv; id _returnValue; bool _supportsSockets; OFRunLoop *_Nullable _runLoop; OFMutableDictionary *_threadDictionary; OFString *_Nullable _name; # ifdef OF_HAVE_SOCKETS OFDNSResolver *_DNSResolver; # endif OF_RESERVE_IVARS(4) } #endif |
︙ | ︙ |
Modified src/OFThread.m from [3758706d1f] to [6151851d64].
︙ | ︙ | |||
11 12 13 14 15 16 17 | * * 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. */ | > | < < | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | * * 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. */ #include "config.h" #define _POSIX_TIMERS #define __NO_EXT_QNX #include <errno.h> #include <stdlib.h> #include <math.h> #include <time.h> #ifdef OF_HAVE_SCHED_YIELD |
︙ | ︙ | |||
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | # import "tlskey.h" # if defined(OF_AMIGAOS) && defined(OF_HAVE_SOCKETS) # import "socket.h" # endif static of_tlskey_t threadSelfKey; static OFThread *mainThread; static void callMain(id object) { OFThread *thread = (OFThread *)object; OFString *name; if (!of_tlskey_set(threadSelfKey, thread)) | > > > > > | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | # import "tlskey.h" # if defined(OF_AMIGAOS) && defined(OF_HAVE_SOCKETS) # import "socket.h" # endif static of_tlskey_t threadSelfKey; static OFThread *mainThread; #elif defined(OF_HAVE_SOCKETS) static OFDNSResolver *DNSResolver; #endif @implementation OFThread #ifdef OF_HAVE_THREADS static void callMain(id object) { OFThread *thread = (OFThread *)object; OFString *name; if (!of_tlskey_set(threadSelfKey, thread)) |
︙ | ︙ | |||
141 142 143 144 145 146 147 | of_socket_deinit(); #endif thread->_running = OF_THREAD_WAITING_FOR_JOIN; [thread release]; } | < < < < < | 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | of_socket_deinit(); #endif thread->_running = OF_THREAD_WAITING_FOR_JOIN; [thread release]; } @synthesize name = _name; # ifdef OF_HAVE_BLOCKS @synthesize threadBlock = _threadBlock; # endif + (void)initialize { |
︙ | ︙ |
Modified src/OFUTF8String.h from [27bd544b4e] to [50f5bbbd9a].
︙ | ︙ | |||
17 18 19 20 21 22 23 | #import "OFString.h" OF_ASSUME_NONNULL_BEGIN @interface OFUTF8String: OFString { | < | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #import "OFString.h" OF_ASSUME_NONNULL_BEGIN @interface OFUTF8String: OFString { /* * A pointer to the actual data. * * Since constant strings don't have `_storage`, they have to allocate * it on the first access. Strings created at runtime just set the * pointer to `&_storage`. */ |
︙ | ︙ |
Modified src/OFWin32ConsoleStdIOStream.h from [4f43803fd9] to [f6d4919bb8].
︙ | ︙ | |||
17 18 19 20 21 22 23 | #define OF_STDIO_STREAM_WIN32CONSOLE_H #import "OFStdIOStream.h" OF_ASSUME_NONNULL_BEGIN | < | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #define OF_STDIO_STREAM_WIN32CONSOLE_H #import "OFStdIOStream.h" OF_ASSUME_NONNULL_BEGIN @interface OFWin32ConsoleStdIOStream: OFStdIOStream { HANDLE _handle; of_char16_t _incompleteUTF16Surrogate; char _incompleteUTF8Surrogate[4]; size_t _incompleteUTF8SurrogateLen; } @end OF_ASSUME_NONNULL_END |