| Comment: | Add OF_DESIGNATED_INITIALIZER & OF_METHOD_FAMILY |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
469a496cd2bd5f2c381585b092518da0 |
| User & Date: | js on 2017-05-08 21:37:11 |
| Other Links: | manifest | tags |
|
2017-05-09
| ||
| 21:25 | Add a few missing OF_ASSUME_NONNULL_{BEGIN,END} (check-in: 13965af7a1 user: js tags: trunk) | |
|
2017-05-08
| ||
| 21:37 | Add OF_DESIGNATED_INITIALIZER & OF_METHOD_FAMILY (check-in: 469a496cd2 user: js tags: trunk) | |
|
2017-05-07
| ||
| 23:14 | Add OF_UNAVAILABLE (check-in: 16c05e87e1 user: js tags: trunk) | |
Modified src/OFApplication.h from [2fba27a966] to [d80a91974e].
| ︙ | ︙ | |||
201 202 203 204 205 206 207 208 209 210 211 212 213 214 | * * This is only available if `OF_HAVE_SANDBOX` is defined. * * @param sandbox The sandbox to activate */ + (void)activateSandbox: (OFSandbox *)sandbox; #endif /*! * @brief Gets argc and argv. * * @param argc A pointer where a pointer to argc should be stored * @param argv A pointer where a pointer to argv should be stored */ | > > | 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | * * This is only available if `OF_HAVE_SANDBOX` is defined. * * @param sandbox The sandbox to activate */ + (void)activateSandbox: (OFSandbox *)sandbox; #endif - init OF_UNAVAILABLE; /*! * @brief Gets argc and argv. * * @param argc A pointer where a pointer to argc should be stored * @param argv A pointer where a pointer to argv should be stored */ |
| ︙ | ︙ |
Modified src/OFApplication.m from [f061f112cb] to [3bc541c774].
| ︙ | ︙ | |||
64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
#ifdef HAVE_SIGACTION
# ifndef SA_RESTART
# define SA_RESTART 0
# endif
#endif
@interface OFApplication ()
- (void)OF_setArgumentCount: (int *)argc
andArgumentValues: (char **[])argv;
#ifdef OF_WINDOWS
- (void)OF_setArgumentCount: (int)argc
andWideArgumentValues: (wchar_t *[])argv;
#endif
- (void)OF_run;
| > | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
#ifdef HAVE_SIGACTION
# ifndef SA_RESTART
# define SA_RESTART 0
# endif
#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;
#endif
- (void)OF_run;
|
| ︙ | ︙ | |||
126 127 128 129 130 131 132 | "application delegate!\n Most likely, you wanted to " "subclass OFObject instead or specified\n the wrong class " "with OF_APPLICATION_DELEGATE().\n", class_getName(cls), class_getName(cls)); exit(1); } | | | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | "application delegate!\n Most likely, you wanted to " "subclass OFObject instead or specified\n the wrong class " "with OF_APPLICATION_DELEGATE().\n", class_getName(cls), class_getName(cls)); exit(1); } app = [[OFApplication alloc] OF_init]; [app OF_setArgumentCount: argc andArgumentValues: argv]; #ifdef OF_WINDOWS __wgetmainargs(&wargc, &wargv, &wenvp, _CRT_glob, &si); [app OF_setArgumentCount: wargc |
| ︙ | ︙ | |||
196 197 198 199 200 201 202 |
#ifdef OF_HAVE_SANDBOX
+ (void)activateSandbox: (OFSandbox *)sandbox
{
[app activateSandbox: sandbox];
}
#endif
| | | 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
#ifdef OF_HAVE_SANDBOX
+ (void)activateSandbox: (OFSandbox *)sandbox
{
[app activateSandbox: sandbox];
}
#endif
- OF_init
{
self = [super init];
@try {
void *pool;
OFMutableDictionary *environment;
#if defined(OF_MACOS)
|
| ︙ | ︙ |
Modified src/OFDeflateStream.h from [e20e08f121] to [9825418b97].
| ︙ | ︙ | |||
84 85 86 87 88 89 90 | * @brief Initializes an already allocated OFDeflateStream with the specified * underlying stream. * * @param stream The underlying stream to which compressed data is written or * from which compressed data is read * @return A initialized OFDeflateStream */ | | | 84 85 86 87 88 89 90 91 92 93 94 | * @brief Initializes an already allocated OFDeflateStream with the specified * underlying stream. * * @param stream The underlying stream to which compressed data is written or * from which compressed data is read * @return A initialized OFDeflateStream */ - initWithStream: (OFStream *)stream OF_DESIGNATED_INITIALIZER; @end OF_ASSUME_NONNULL_END |
Modified src/OFGZIPStream.h from [3b1588eaa2] to [85683f4f90].
| ︙ | ︙ | |||
71 72 73 74 75 76 77 | uint8_t _buffer[4]; OFDate *_modificationDate; uint16_t _extraLength; uint32_t _CRC32, _uncompressedSize; } + (instancetype)streamWithStream: (OFStream *)stream; | > | | 71 72 73 74 75 76 77 78 79 80 81 82 | uint8_t _buffer[4]; OFDate *_modificationDate; uint16_t _extraLength; uint32_t _CRC32, _uncompressedSize; } + (instancetype)streamWithStream: (OFStream *)stream; - init OF_UNAVAILABLE; - initWithStream: (OFStream *)stream OF_DESIGNATED_INITIALIZER; @end OF_ASSUME_NONNULL_END |
Modified src/OFGZIPStream.m from [e4f1e2e6e9] to [1028d48dc9].
| ︙ | ︙ | |||
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
#import "OFInvalidFormatException.h"
@implementation OFGZIPStream
+ (instancetype)streamWithStream: (OFStream *)stream
{
return [[[self alloc] initWithStream: stream] autorelease];
}
- initWithStream: (OFStream *)stream
{
self = [super init];
@try {
_stream = [stream retain];
| > > > > > | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
#import "OFInvalidFormatException.h"
@implementation OFGZIPStream
+ (instancetype)streamWithStream: (OFStream *)stream
{
return [[[self alloc] initWithStream: stream] autorelease];
}
- init
{
OF_INVALID_INIT_METHOD
}
- initWithStream: (OFStream *)stream
{
self = [super init];
@try {
_stream = [stream retain];
|
| ︙ | ︙ |
Modified src/OFHMAC.h from [6621f48b54] to [78bbd3d482].
| ︙ | ︙ | |||
39 40 41 42 43 44 45 46 47 48 49 50 51 52 | * @brief Returns a new OFHMAC with the specified hashing algorithm. * * @param hashClass The class of the hashing algorithm * @return A new, autoreleased OFHMAC */ + (instancetype)HMACWithHashClass: (Class <OFCryptoHash>)hashClass; /*! * @brief Initialized an already allocated OFHMAC with the specified hashing * algorithm. * * @param hashClass The class of the hashing algorithm * @return An initialized OFHMAC */ | > > | | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | * @brief Returns a new OFHMAC with the specified hashing algorithm. * * @param hashClass The class of the hashing algorithm * @return A new, autoreleased OFHMAC */ + (instancetype)HMACWithHashClass: (Class <OFCryptoHash>)hashClass; - init OF_UNAVAILABLE; /*! * @brief Initialized an already allocated OFHMAC with the specified hashing * algorithm. * * @param hashClass The class of the hashing algorithm * @return An initialized OFHMAC */ - initWithHashClass: (Class <OFCryptoHash>)hashClass OF_DESIGNATED_INITIALIZER; /*! * @brief Sets the key for the HMAC. * * @note This resets the HMAC! * * @warning This invalidates any pointer previously returned by @ref digest. If |
| ︙ | ︙ |
Modified src/OFHMAC.m from [1827be5212] to [7f4d2f3cf3].
| ︙ | ︙ | |||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
@implementation OFHMAC
@synthesize hashClass = _hashClass;
+ (instancetype)HMACWithHashClass: (Class <OFCryptoHash>)class
{
return [[[self alloc] initWithHashClass: class] autorelease];
}
- initWithHashClass: (Class <OFCryptoHash>)class
{
self = [super init];
_hashClass = class;
| > > > > > | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
@implementation OFHMAC
@synthesize hashClass = _hashClass;
+ (instancetype)HMACWithHashClass: (Class <OFCryptoHash>)class
{
return [[[self alloc] initWithHashClass: class] autorelease];
}
- init
{
OF_INVALID_INIT_METHOD
}
- initWithHashClass: (Class <OFCryptoHash>)class
{
self = [super init];
_hashClass = class;
|
| ︙ | ︙ |
Modified src/OFHTTPCookie.h from [043530f9e6] to [018d756744].
| ︙ | ︙ | |||
99 100 101 102 103 104 105 | * and value. * * @param name The name of the cookie * @param value The value of the cookie * @return An initialized OFHTTPCookie */ - initWithName: (OFString *)name | | | 99 100 101 102 103 104 105 106 107 | * and value. * * @param name The name of the cookie * @param value The value of the cookie * @return An initialized OFHTTPCookie */ - initWithName: (OFString *)name value: (OFString *)value OF_DESIGNATED_INITIALIZER; @end |
Modified src/OFINICategory+Private.h from [3108b44cc4] to [9eccb1bef3].
| ︙ | ︙ | |||
18 19 20 21 22 23 24 | #import "OFString.h" OF_ASSUME_NONNULL_BEGIN @class OFStream; @interface OFINICategory () | | | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #import "OFString.h" OF_ASSUME_NONNULL_BEGIN @class OFStream; @interface OFINICategory () - (instancetype)OF_init OF_METHOD_FAMILY(init); - (void)OF_parseLine: (OFString *)line; - (bool)OF_writeToStream: (OFStream *)stream encoding: (of_string_encoding_t)encoding first: (bool)first; @end OF_ASSUME_NONNULL_END |
Modified src/OFINIFile.h from [4b14f5b90f] to [80cc8bd83f].
| ︙ | ︙ | |||
71 72 73 74 75 76 77 | * * @param path The path to the file whose contents the OFINIFile should contain * @param encoding The encoding of the specified file * * @return An initialized OFINIFile with the contents of the specified file */ - initWithPath: (OFString *)path | | | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
*
* @param path The path to the file whose contents the OFINIFile should contain
* @param encoding The encoding of the specified file
*
* @return An initialized OFINIFile with the contents of the specified file
*/
- initWithPath: (OFString *)path
encoding: (of_string_encoding_t)encoding OF_DESIGNATED_INITIALIZER;
/*!
* @brief Returns an @ref OFINICategory for the category with the specified
* name.
*
* @param name The name of the category for which an @ref OFINICategory should
* be returned
|
| ︙ | ︙ |
Modified src/OFIntrospection.h from [84b226376f] to [f61e265eb4].
| ︙ | ︙ | |||
210 211 212 213 214 215 216 | /*! * @brief Initializes an already allocated OFIntrospection with the specified * class. * * @return An initialized OFIntrospection */ | | | 210 211 212 213 214 215 216 217 218 219 220 | /*! * @brief Initializes an already allocated OFIntrospection with the specified * class. * * @return An initialized OFIntrospection */ - initWithClass: (Class)class_ OF_DESIGNATED_INITIALIZER; @end OF_ASSUME_NONNULL_END |
Modified src/OFMapTable.h from [6e6fb2bdca] to [39ab811d56].
| ︙ | ︙ | |||
133 134 135 136 137 138 139 |
* @param objectFunctions A structure of functions for handling objects
* @param capacity A hint about the count of elements expected to be in the map
* table
* @return An initialized OFMapTable
*/
- initWithKeyFunctions: (of_map_table_functions_t)keyFunctions
objectFunctions: (of_map_table_functions_t)objectFunctions
| | | 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
* @param objectFunctions A structure of functions for handling objects
* @param capacity A hint about the count of elements expected to be in the map
* table
* @return An initialized OFMapTable
*/
- initWithKeyFunctions: (of_map_table_functions_t)keyFunctions
objectFunctions: (of_map_table_functions_t)objectFunctions
capacity: (size_t)capacity OF_DESIGNATED_INITIALIZER;
/*!
* @brief Returns the number of objects in the map table.
*
* @return The number of objects in the map table
*/
- (size_t)count;
|
| ︙ | ︙ |
Modified src/OFMapTable.m from [0faf59214b] to [654a4184b9].
| ︙ | ︙ | |||
66 67 68 69 70 71 72 | hash: (uint32_t)hash; @end @interface OFMapTableEnumerator () - (instancetype)OF_initWithMapTable: (OFMapTable *)mapTable buckets: (struct of_map_table_bucket **)buckets capacity: (uint32_t)capacity | | > | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
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
@interface OFMapTableKeyEnumerator: OFMapTableEnumerator
@end
@interface OFMapTableObjectEnumerator: OFMapTableEnumerator
@end
|
| ︙ | ︙ |
Modified src/OFMessagePackExtension.h from [c6fa58099b] to [1d2cd153ce].
| ︙ | ︙ | |||
62 63 64 65 66 67 68 | * specified type and data. * * @param type The MessagePack extension type * @param data The data for the extension * @return An initialized OFMessagePackRepresentation */ - initWithType: (int8_t)type | | | 62 63 64 65 66 67 68 69 70 71 72 | * specified type and data. * * @param type The MessagePack extension type * @param data The data for the extension * @return An initialized OFMessagePackRepresentation */ - initWithType: (int8_t)type data: (OFDataArray *)data OF_DESIGNATED_INITIALIZER; @end OF_ASSUME_NONNULL_END |
Modified src/OFOptionsParser.h from [4d8e830dc7] to [649b3c8175].
| ︙ | ︙ | |||
128 129 130 131 132 133 134 | * * @param options An array of @ref of_options_parser_option_t specifying all * accepted options, terminated with an option whose short * option is `\0` and long option is `nil`. * * @return An initialized OFOptionsParser */ | | > | 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
*
* @param options An array of @ref of_options_parser_option_t specifying all
* accepted options, terminated with an option whose short
* option is `\0` and long option is `nil`.
*
* @return An initialized OFOptionsParser
*/
- initWithOptions: (const of_options_parser_option_t *)options
OF_DESIGNATED_INITIALIZER;
/*!
* @brief Returns the next option.
*
* If the option is only available as a long option, `-` is returned.
* Otherwise, the short option is returned, even if it was specified as a long
* option.@n
|
| ︙ | ︙ |
Modified src/OFProcess.h from [1e2a3e60ab] to [f549c80d9c].
| ︙ | ︙ | |||
169 170 171 172 173 174 175 |
* environment first, copy it, modify it and then pass it.
* @return An initialized OFProcess.
*/
- initWithProgram: (OFString *)program
programName: (OFString *)programName
arguments: (nullable OFArray OF_GENERIC(OFString *) *)arguments
environment: (nullable OFDictionary
| | > | 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
* environment first, copy it, modify it and then pass it.
* @return An initialized OFProcess.
*/
- initWithProgram: (OFString *)program
programName: (OFString *)programName
arguments: (nullable OFArray OF_GENERIC(OFString *) *)arguments
environment: (nullable OFDictionary
OF_GENERIC(OFString *, OFString *) *)environment
OF_DESIGNATED_INITIALIZER;
/*!
* @brief Closes the write direction of the process.
*
* This method needs to be called for some programs before data can be read,
* since some programs don't start processing before the write direction is
* closed.
*/
- (void)closeForWriting;
@end
OF_ASSUME_NONNULL_END
|
Modified src/OFSettings.h from [9ca0864425] to [92ccb51f12].
| ︙ | ︙ | |||
58 59 60 61 62 63 64 | * @brief Initializes an already allocated OFSettings instance with the * specified application name. * * @param applicationName The name of the application whose settings should be * accessed * @return An initialized OFSettings instance */ | | > | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
* @brief Initializes an already allocated OFSettings instance with the
* specified application name.
*
* @param applicationName The name of the application whose settings should be
* accessed
* @return An initialized OFSettings instance
*/
- initWithApplicationName: (OFString *)applicationName
OF_DESIGNATED_INITIALIZER;
/*!
* @brief Sets the specified path to the specified string.
*
* @param string The string to set
* @param path The path to store the string at
*/
|
| ︙ | ︙ |
Modified src/OFStdIOStream+Private.h from [97f613cfdd] to [c761984453].
| ︙ | ︙ | |||
15 16 17 18 19 20 21 | */ #import "OFStdIOStream.h" OF_ASSUME_NONNULL_BEGIN @interface OFStdIOStream () | | | 15 16 17 18 19 20 21 22 23 24 25 | */ #import "OFStdIOStream.h" OF_ASSUME_NONNULL_BEGIN @interface OFStdIOStream () - (instancetype)OF_initWithFileDescriptor: (int)fd OF_METHOD_FAMILY(init); @end OF_ASSUME_NONNULL_END |
Modified src/OFString_UTF8+Private.h from [94d042b3cd] to [bb37f1c56d].
| ︙ | ︙ | |||
17 18 19 20 21 22 23 | #import "OFString_UTF8.h" OF_ASSUME_NONNULL_BEGIN @interface OFString_UTF8 () - (instancetype)OF_initWithUTF8String: (const char *)UTF8String length: (size_t)UTF8StringLength | | | 17 18 19 20 21 22 23 24 25 26 27 | #import "OFString_UTF8.h" OF_ASSUME_NONNULL_BEGIN @interface OFString_UTF8 () - (instancetype)OF_initWithUTF8String: (const char *)UTF8String length: (size_t)UTF8StringLength storage: (char *)storage OF_METHOD_FAMILY(init); @end OF_ASSUME_NONNULL_END |
Modified src/OFTarArchive.h from [f202a7f964] to [90a272ca60].
| ︙ | ︙ | |||
58 59 60 61 62 63 64 | /*! * @brief Initializes an already allocated OFTarArchive object with the * specified stream. * * @param stream A stream from which the tar archive will be read * @return An initialized OFTarArchive */ | | | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | /*! * @brief Initializes an already allocated OFTarArchive object with the * specified stream. * * @param stream A stream from which the tar archive will be read * @return An initialized OFTarArchive */ - initWithStream: (OFStream *)stream OF_DESIGNATED_INITIALIZER; #ifdef OF_HAVE_FILES /*! * @brief Initializes an already allocated OFTarArchive object with the * specified file. * * @param path The path to the tar archive |
| ︙ | ︙ |
Modified src/OFTarArchive.m from [ef68919153] to [8c89569c12].
| ︙ | ︙ | |||
47 48 49 50 51 52 53 |
return self;
}
#ifdef OF_HAVE_FILES
- initWithPath: (OFString *)path
{
| < < < | | > > | | < < < | 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
return self;
}
#ifdef OF_HAVE_FILES
- initWithPath: (OFString *)path
{
OFFile *file = [[OFFile alloc] initWithPath: path
mode: @"rb"];
@try {
return [self initWithStream: file];
} @finally {
[file release];
}
}
#endif
- (void)dealloc
{
[_stream release];
[_lastReturnedEntry release];
|
| ︙ | ︙ |
Modified src/OFTarArchiveEntry+Private.h from [6ecc8476c9] to [0bb407dd23].
| ︙ | ︙ | |||
16 17 18 19 20 21 22 | #import "OFTarArchiveEntry.h" OF_ASSUME_NONNULL_BEGIN @interface OFTarArchiveEntry () - (instancetype)OF_initWithHeader: (char[_Nonnull 512])header | | | 16 17 18 19 20 21 22 23 24 25 26 27 | #import "OFTarArchiveEntry.h" OF_ASSUME_NONNULL_BEGIN @interface OFTarArchiveEntry () - (instancetype)OF_initWithHeader: (char[_Nonnull 512])header stream: (OFStream *)stream OF_METHOD_FAMILY(init); - (void)OF_skip; @end OF_ASSUME_NONNULL_END |
Modified src/OFTarArchiveEntry.h from [0005919ebe] to [9da73d68ac].
| ︙ | ︙ | |||
109 110 111 112 113 114 115 116 117 118 | */ @property (readonly) uint32_t deviceMajor; /*! * The device major (if the file is a device). */ @property (readonly) uint32_t deviceMinor; @end OF_ASSUME_NONNULL_END | > > | 109 110 111 112 113 114 115 116 117 118 119 120 | */ @property (readonly) uint32_t deviceMajor; /*! * The device major (if the file is a device). */ @property (readonly) uint32_t deviceMinor; - init OF_UNAVAILABLE; @end OF_ASSUME_NONNULL_END |
Modified src/OFTarArchiveEntry.m from [c0d69369d6] to [e989f0ffdc].
| ︙ | ︙ | |||
52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
@implementation OFTarArchiveEntry
@synthesize fileName = _fileName, mode = _mode, size = _size;
@synthesize modificationDate = _modificationDate, type = _type;
@synthesize targetFileName = _targetFileName;
@synthesize owner = _owner, group = _group;
@synthesize deviceMajor = _deviceMajor, deviceMinor = _deviceMinor;
- (instancetype)OF_initWithHeader: (char[512])header
stream: (OFStream *)stream
{
self = [super init];
@try {
| > > > > > | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
@implementation OFTarArchiveEntry
@synthesize fileName = _fileName, mode = _mode, size = _size;
@synthesize modificationDate = _modificationDate, type = _type;
@synthesize targetFileName = _targetFileName;
@synthesize owner = _owner, group = _group;
@synthesize deviceMajor = _deviceMajor, deviceMinor = _deviceMinor;
- init
{
OF_INVALID_INIT_METHOD
}
- (instancetype)OF_initWithHeader: (char[512])header
stream: (OFStream *)stream
{
self = [super init];
@try {
|
| ︙ | ︙ |
Modified src/OFThreadPool.h from [e644d679dd] to [952657173f].
| ︙ | ︙ | |||
75 76 77 78 79 80 81 | /*! * @brief Initializes an already allocated OFThreadPool with the specified * number of threads. * * @param size The number of threads for the pool * @return An initialized OFThreadPool with the specified number of threads */ | | | 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | /*! * @brief Initializes an already allocated OFThreadPool with the specified * number of threads. * * @param size The number of threads for the pool * @return An initialized OFThreadPool with the specified number of threads */ - initWithSize: (size_t)size OF_DESIGNATED_INITIALIZER; /*! * @brief Execute the specified selector on the specified target with the * specified object as soon as a thread is ready. * * @param target The target on which to perform the selector * @param selector The selector to perform on the target |
| ︙ | ︙ |
Modified src/OFXMLParser.m from [829d513f17] to [f6cfcd55b0].
| ︙ | ︙ | |||
284 285 286 287 288 289 290 |
}
#ifdef OF_HAVE_FILES
- (void)parseFile: (OFString *)path
{
OFFile *file = [[OFFile alloc] initWithPath: path
mode: @"rb"];
| < | 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
}
#ifdef OF_HAVE_FILES
- (void)parseFile: (OFString *)path
{
OFFile *file = [[OFFile alloc] initWithPath: path
mode: @"rb"];
@try {
[self parseStream: file];
} @finally {
[file release];
}
}
#endif
|
| ︙ | ︙ |
Modified src/OFZIPArchive.h from [dcc2238569] to [e7781533c2].
| ︙ | ︙ | |||
75 76 77 78 79 80 81 | /*! * @brief Initializes an already allocated OFZIPArchive object with the * specified seekable stream. * * @param stream A seekable stream from which the ZIP archive will be read * @return An initialized OFZIPArchive */ | | | 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | /*! * @brief Initializes an already allocated OFZIPArchive object with the * specified seekable stream. * * @param stream A seekable stream from which the ZIP archive will be read * @return An initialized OFZIPArchive */ - initWithSeekableStream: (OFSeekableStream *)stream OF_DESIGNATED_INITIALIZER; #ifdef OF_HAVE_FILES /*! * @brief Initializes an already allocated OFZIPArchive object with the * specified file. * * @param path The path to the ZIP file |
| ︙ | ︙ |
Modified src/OFZIPArchive.m from [df3e45938b] to [160928f0d5].
| ︙ | ︙ | |||
169 170 171 172 173 174 175 |
return self;
}
#ifdef OF_HAVE_FILES
- initWithPath: (OFString *)path
{
| < < < | | | | < | | < < < | 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
return self;
}
#ifdef OF_HAVE_FILES
- initWithPath: (OFString *)path
{
OFFile *file = [[OFFile alloc] initWithPath: path
mode: @"rb"];
@try {
return [self initWithSeekableStream: file];
} @finally {
[file release];
}
}
#endif
- (void)dealloc
{
[_stream release];
[_archiveComment release];
|
| ︙ | ︙ |
Modified src/OFZIPArchiveEntry+Private.h from [aa6cbb3cc6] to [ad70cd24c3].
| ︙ | ︙ | |||
18 19 20 21 22 23 24 | OF_ASSUME_NONNULL_BEGIN @interface OFZIPArchiveEntry () @property (readonly) uint16_t OF_lastModifiedFileTime, OF_lastModifiedFileDate; @property (readonly) int64_t OF_localFileHeaderOffset; | | | 18 19 20 21 22 23 24 25 26 27 28 | OF_ASSUME_NONNULL_BEGIN @interface OFZIPArchiveEntry () @property (readonly) uint16_t OF_lastModifiedFileTime, OF_lastModifiedFileDate; @property (readonly) int64_t OF_localFileHeaderOffset; - (instancetype)OF_initWithStream: (OFStream *)stream OF_METHOD_FAMILY(init); @end OF_ASSUME_NONNULL_END |
Modified src/OFZIPArchiveEntry.h from [860be1e03d] to [c93bbb12ac].
| ︙ | ︙ | |||
170 171 172 173 174 175 176 177 178 179 180 181 182 183 | /*! * The general purpose bit flag of the entry. * * See the ZIP specification for details. */ @property (readonly) uint16_t generalPurposeBitFlag; /*! * @brief Returns the last modification date of the entry's file. * * @return The last modification date of the entry's file */ - (OFDate *)modificationDate; | > > | 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | /*! * The general purpose bit flag of the entry. * * See the ZIP specification for details. */ @property (readonly) uint16_t generalPurposeBitFlag; - init OF_UNAVAILABLE; /*! * @brief Returns the last modification date of the entry's file. * * @return The last modification date of the entry's file */ - (OFDate *)modificationDate; |
| ︙ | ︙ |
Modified src/OFZIPArchiveEntry.m from [7d2a571c32] to [103543f1f3].
| ︙ | ︙ | |||
150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
@synthesize uncompressedSize = _uncompressedSize;
@synthesize CRC32 = _CRC32;
@synthesize versionSpecificAttributes = _versionSpecificAttributes;
@synthesize generalPurposeBitFlag = _generalPurposeBitFlag;
@synthesize OF_lastModifiedFileTime = _lastModifiedFileTime;
@synthesize OF_lastModifiedFileDate = _lastModifiedFileDate;
@synthesize OF_localFileHeaderOffset = _localFileHeaderOffset;
- (instancetype)OF_initWithStream: (OFStream *)stream
{
self = [super init];
@try {
void *pool = objc_autoreleasePoolPush();
| > > > > > | 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
@synthesize uncompressedSize = _uncompressedSize;
@synthesize CRC32 = _CRC32;
@synthesize versionSpecificAttributes = _versionSpecificAttributes;
@synthesize generalPurposeBitFlag = _generalPurposeBitFlag;
@synthesize OF_lastModifiedFileTime = _lastModifiedFileTime;
@synthesize OF_lastModifiedFileDate = _lastModifiedFileDate;
@synthesize OF_localFileHeaderOffset = _localFileHeaderOffset;
- init
{
OF_INVALID_INIT_METHOD
}
- (instancetype)OF_initWithStream: (OFStream *)stream
{
self = [super init];
@try {
void *pool = objc_autoreleasePoolPush();
|
| ︙ | ︙ |
Modified src/macros.h from [bccd9112c7] to [9127ca3dee].
| ︙ | ︙ | |||
217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
#if __has_attribute(__objc_subclassing_restricted__)
# define OF_SUBCLASSING_RESTRICTED \
__attribute__((__objc_subclassing_restricted__))
#else
# define OF_SUBCLASSING_RESTRICTED
#endif
#ifdef __GNUC__
# ifdef OF_X86_64
# define OF_X86_64_ASM
# endif
# ifdef OF_X86
# define OF_X86_ASM
| > > > > > > > > > > > > > | 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
#if __has_attribute(__objc_subclassing_restricted__)
# define OF_SUBCLASSING_RESTRICTED \
__attribute__((__objc_subclassing_restricted__))
#else
# define OF_SUBCLASSING_RESTRICTED
#endif
#if __has_attribute(__objc_method_family__)
# define OF_METHOD_FAMILY(f) __attribute__((__objc_method_family__(f)))
#else
# define OF_METHOD_FAMILY(f)
#endif
#if __has_attribute(__objc_designated_initializer__)
# define OF_DESIGNATED_INITIALIZER \
__attribute__((__objc_designated_initializer__))
#else
# define OF_DESIGNATED_INITIALIZER
#endif
#ifdef __GNUC__
# ifdef OF_X86_64
# define OF_X86_64_ASM
# endif
# ifdef OF_X86
# define OF_X86_ASM
|
| ︙ | ︙ |