Changed throwing of Swift errors from the Stream reading/writing to be nonnull_error rather than zero_result. Continues to work with Swift 2.x but now works with Swift 3 Beta (circa XCode 8 beta 6)

This commit is contained in:
Andy Johnson
2016-08-26 16:53:19 +01:00
parent 8364f87f9a
commit ec6056de67
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -231,7 +231,7 @@ static const NSInteger OZLocateFileResultFound= 1;
@throws OZZipException If the zip file has been opened with a mode other than
Unzip.
*/
- (NSInteger) __attribute__((swift_error(zero_result))) locateFileInZip:(nonnull NSString *)fileNameInZip error:(NSError * __autoreleasing __nullable * __nullable)error;
- (NSInteger) __attribute__((swift_error(nonnull_error))) locateFileInZip:(nonnull NSString *)fileNameInZip error:(NSError * __autoreleasing __nullable * __nullable)error;
/**
@brief Returns the number of files contained in the zip file.
@@ -242,7 +242,7 @@ static const NSInteger OZLocateFileResultFound= 1;
@throws OZZipException If the zip file has been opened with a mode other
than Unzip.
*/
- (NSUInteger) __attribute__((swift_error(zero_result))) numFilesInZipWithError:(NSError * __autoreleasing __nullable * __nullable)error;
- (NSUInteger) __attribute__((swift_error(nonnull_error))) numFilesInZipWithError:(NSError * __autoreleasing __nullable * __nullable)error;
/**
@brief Returns a list of OZFileInZipInfo with the information on all the files
+1 -1
View File
@@ -58,7 +58,7 @@ static const NSInteger OZReadStreamResultEndOfFile= -1;
<br/>NOTE: return value convention is different in the standard (non-NSError
compliant) interface.
*/
- (NSInteger) __attribute__((swift_error(zero_result))) readDataWithBuffer:(nonnull NSMutableData *)buffer error:(NSError * __autoreleasing __nullable * __nullable)error;
- (NSInteger) __attribute__((swift_error(nonnull_error))) readDataWithBuffer:(nonnull NSMutableData *)buffer error:(NSError * __autoreleasing __nullable * __nullable)error;
/**
@brief Closes the read steam.