@@ -14,6 +14,7 @@ use std::os::raw::c_void;
14
14
use base:: { id, BOOL , NO , SEL , nil} ;
15
15
use block:: Block ;
16
16
use libc;
17
+ use objc2:: runtime:: Bool ;
17
18
use objc2_encode:: { Encode , Encoding , RefEncode } ;
18
19
19
20
@@ -368,17 +369,17 @@ pub trait NSDictionary: Sized {
368
369
369
370
unsafe fn keyEnumerator ( self ) -> id ;
370
371
unsafe fn objectEnumerator ( self ) -> id ;
371
- unsafe fn enumerateKeysAndObjectsUsingBlock_ ( self , block : * mut Block < ( id , id , * mut BOOL ) , ( ) > ) ;
372
+ unsafe fn enumerateKeysAndObjectsUsingBlock_ ( self , block : * mut Block < ( id , id , * mut Bool ) , ( ) > ) ;
372
373
unsafe fn enumerateKeysAndObjectsWithOptions_usingBlock_ ( self , opts : NSEnumerationOptions ,
373
- block : * mut Block < ( id , id , * mut BOOL ) , ( ) > ) ;
374
+ block : * mut Block < ( id , id , * mut Bool ) , ( ) > ) ;
374
375
375
376
unsafe fn keysSortedByValueUsingSelector_ ( self , comparator : SEL ) -> id ;
376
377
unsafe fn keysSortedByValueUsingComparator_ ( self , cmptr : NSComparator ) -> id ;
377
378
unsafe fn keysSortedByValueWithOptions_usingComparator_ ( self , opts : NSEnumerationOptions , cmptr : NSComparator ) -> id ;
378
379
379
- unsafe fn keysOfEntriesPassingTest_ ( self , predicate : * mut Block < ( id , id , * mut BOOL ) , BOOL > ) -> id ;
380
+ unsafe fn keysOfEntriesPassingTest_ ( self , predicate : * mut Block < ( id , id , * mut Bool ) , Bool > ) -> id ;
380
381
unsafe fn keysOfEntriesWithOptions_PassingTest_ ( self , opts : NSEnumerationOptions ,
381
- predicate : * mut Block < ( id , id , * mut BOOL ) , BOOL > ) -> id ;
382
+ predicate : * mut Block < ( id , id , * mut Bool ) , Bool > ) -> id ;
382
383
383
384
unsafe fn writeToFile_atomically_ ( self , path : id , flag : BOOL ) -> BOOL ;
384
385
unsafe fn writeToURL_atomically_ ( self , aURL : id , flag : BOOL ) -> BOOL ;
@@ -481,12 +482,12 @@ impl NSDictionary for id {
481
482
msg_send ! [ self , objectEnumerator]
482
483
}
483
484
484
- unsafe fn enumerateKeysAndObjectsUsingBlock_ ( self , block : * mut Block < ( id , id , * mut BOOL ) , ( ) > ) {
485
+ unsafe fn enumerateKeysAndObjectsUsingBlock_ ( self , block : * mut Block < ( id , id , * mut Bool ) , ( ) > ) {
485
486
msg_send ! [ self , enumerateKeysAndObjectsUsingBlock: block]
486
487
}
487
488
488
489
unsafe fn enumerateKeysAndObjectsWithOptions_usingBlock_ ( self , opts : NSEnumerationOptions ,
489
- block : * mut Block < ( id , id , * mut BOOL ) , ( ) > ) {
490
+ block : * mut Block < ( id , id , * mut Bool ) , ( ) > ) {
490
491
msg_send ! [ self , enumerateKeysAndObjectsWithOptions: opts usingBlock: block]
491
492
}
492
493
@@ -503,12 +504,12 @@ impl NSDictionary for id {
503
504
rv
504
505
}
505
506
506
- unsafe fn keysOfEntriesPassingTest_ ( self , predicate : * mut Block < ( id , id , * mut BOOL ) , BOOL > ) -> id {
507
+ unsafe fn keysOfEntriesPassingTest_ ( self , predicate : * mut Block < ( id , id , * mut Bool ) , Bool > ) -> id {
507
508
msg_send ! [ self , keysOfEntriesPassingTest: predicate]
508
509
}
509
510
510
511
unsafe fn keysOfEntriesWithOptions_PassingTest_ ( self , opts : NSEnumerationOptions ,
511
- predicate : * mut Block < ( id , id , * mut BOOL ) , BOOL > ) -> id {
512
+ predicate : * mut Block < ( id , id , * mut Bool ) , Bool > ) -> id {
512
513
msg_send ! [ self , keysOfEntriesWithOptions: opts PassingTest : predicate]
513
514
}
514
515
@@ -832,8 +833,8 @@ pub trait NSURL: Sized {
832
833
unsafe fn initFileURLWithPath_ ( self , path : id ) -> id ;
833
834
unsafe fn fileURLWithPathComponents_ ( _: Self , path_components : id /* (NSArray<NSString*>*) */ ) -> id ;
834
835
unsafe fn URLByResolvingAliasFileAtURL_options_error_ ( _: Self , url : id , options : NSURLBookmarkResolutionOptions , error : * mut id /* (NSError _Nullable) */ ) -> id ;
835
- unsafe fn URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_ ( _: Self , data : id /* (NSData) */ , options : NSURLBookmarkResolutionOptions , relative_to_url : id , is_stale : * mut BOOL , error : * mut id /* (NSError _Nullable) */ ) -> id ;
836
- unsafe fn initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_ ( self , data : id /* (NSData) */ , options : NSURLBookmarkResolutionOptions , relative_to_url : id , is_stale : * mut BOOL , error : * mut id /* (NSError _Nullable) */ ) -> id ;
836
+ unsafe fn URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_ ( _: Self , data : id /* (NSData) */ , options : NSURLBookmarkResolutionOptions , relative_to_url : id , is_stale : * mut Bool , error : * mut id /* (NSError _Nullable) */ ) -> id ;
837
+ unsafe fn initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_ ( self , data : id /* (NSData) */ , options : NSURLBookmarkResolutionOptions , relative_to_url : id , is_stale : * mut Bool , error : * mut id /* (NSError _Nullable) */ ) -> id ;
837
838
// unsafe fn fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_
838
839
// unsafe fn getFileSystemRepresentation_maxLength_
839
840
// unsafe fn initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_
@@ -955,10 +956,10 @@ impl NSURL for id {
955
956
unsafe fn URLByResolvingAliasFileAtURL_options_error_ ( _: Self , url : id , options : NSURLBookmarkResolutionOptions , error : * mut id /* (NSError _Nullable) */ ) -> id {
956
957
msg_send ! [ class!( NSURL ) , URLByResolvingAliasFileAtURL : url options: options error: error]
957
958
}
958
- unsafe fn URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_ ( _: Self , data : id /* (NSData) */ , options : NSURLBookmarkResolutionOptions , relative_to_url : id , is_stale : * mut BOOL , error : * mut id /* (NSError _Nullable) */ ) -> id {
959
+ unsafe fn URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_ ( _: Self , data : id /* (NSData) */ , options : NSURLBookmarkResolutionOptions , relative_to_url : id , is_stale : * mut Bool , error : * mut id /* (NSError _Nullable) */ ) -> id {
959
960
msg_send ! [ class!( NSURL ) , URLByResolvingBookmarkData : data options: options relativeToURL: relative_to_url bookmarkDataIsStale: is_stale error: error]
960
961
}
961
- unsafe fn initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_ ( self , data : id /* (NSData) */ , options : NSURLBookmarkResolutionOptions , relative_to_url : id , is_stale : * mut BOOL , error : * mut id /* (NSError _Nullable) */ ) -> id {
962
+ unsafe fn initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_ ( self , data : id /* (NSData) */ , options : NSURLBookmarkResolutionOptions , relative_to_url : id , is_stale : * mut Bool , error : * mut id /* (NSError _Nullable) */ ) -> id {
962
963
msg_send ! [ self , initByResolvingBookmarkData: data options: options relativeToURL: relative_to_url bookmarkDataIsStale: is_stale error: error]
963
964
}
964
965
// unsafe fn fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_
@@ -1226,7 +1227,7 @@ pub trait NSData: Sized {
1226
1227
1227
1228
unsafe fn bytes ( self ) -> * const c_void ;
1228
1229
unsafe fn description ( self ) -> id ;
1229
- unsafe fn enumerateByteRangesUsingBlock_ ( self , block : * mut Block < ( * const c_void , NSRange , * mut BOOL ) , ( ) > ) ;
1230
+ unsafe fn enumerateByteRangesUsingBlock_ ( self , block : * mut Block < ( * const c_void , NSRange , * mut Bool ) , ( ) > ) ;
1230
1231
unsafe fn getBytes_length_ ( self , buffer : * mut c_void , length : NSUInteger ) ;
1231
1232
unsafe fn getBytes_range_ ( self , buffer : * mut c_void , range : NSRange ) ;
1232
1233
unsafe fn subdataWithRange_ ( self , range : NSRange ) -> id ;
@@ -1305,7 +1306,7 @@ impl NSData for id {
1305
1306
msg_send ! [ self , description]
1306
1307
}
1307
1308
1308
- unsafe fn enumerateByteRangesUsingBlock_ ( self , block : * mut Block < ( * const c_void , NSRange , * mut BOOL ) , ( ) > ) {
1309
+ unsafe fn enumerateByteRangesUsingBlock_ ( self , block : * mut Block < ( * const c_void , NSRange , * mut Bool ) , ( ) > ) {
1309
1310
msg_send ! [ self , enumerateByteRangesUsingBlock: block]
1310
1311
}
1311
1312
0 commit comments