@@ -14,6 +14,7 @@ use std::os::raw::c_void;
1414use base:: { id, BOOL , NO , SEL , nil} ;
1515use block:: Block ;
1616use libc;
17+ use objc2:: runtime:: Bool ;
1718use objc2_encode:: { Encode , Encoding , RefEncode } ;
1819
1920
@@ -368,17 +369,17 @@ pub trait NSDictionary: Sized {
368369
369370 unsafe fn keyEnumerator ( self ) -> id ;
370371 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 ) , ( ) > ) ;
372373 unsafe fn enumerateKeysAndObjectsWithOptions_usingBlock_ ( self , opts : NSEnumerationOptions ,
373- block : * mut Block < ( id , id , * mut BOOL ) , ( ) > ) ;
374+ block : * mut Block < ( id , id , * mut Bool ) , ( ) > ) ;
374375
375376 unsafe fn keysSortedByValueUsingSelector_ ( self , comparator : SEL ) -> id ;
376377 unsafe fn keysSortedByValueUsingComparator_ ( self , cmptr : NSComparator ) -> id ;
377378 unsafe fn keysSortedByValueWithOptions_usingComparator_ ( self , opts : NSEnumerationOptions , cmptr : NSComparator ) -> id ;
378379
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 ;
380381 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 ;
382383
383384 unsafe fn writeToFile_atomically_ ( self , path : id , flag : BOOL ) -> BOOL ;
384385 unsafe fn writeToURL_atomically_ ( self , aURL : id , flag : BOOL ) -> BOOL ;
@@ -481,12 +482,12 @@ impl NSDictionary for id {
481482 msg_send ! [ self , objectEnumerator]
482483 }
483484
484- unsafe fn enumerateKeysAndObjectsUsingBlock_ ( self , block : * mut Block < ( id , id , * mut BOOL ) , ( ) > ) {
485+ unsafe fn enumerateKeysAndObjectsUsingBlock_ ( self , block : * mut Block < ( id , id , * mut Bool ) , ( ) > ) {
485486 msg_send ! [ self , enumerateKeysAndObjectsUsingBlock: block]
486487 }
487488
488489 unsafe fn enumerateKeysAndObjectsWithOptions_usingBlock_ ( self , opts : NSEnumerationOptions ,
489- block : * mut Block < ( id , id , * mut BOOL ) , ( ) > ) {
490+ block : * mut Block < ( id , id , * mut Bool ) , ( ) > ) {
490491 msg_send ! [ self , enumerateKeysAndObjectsWithOptions: opts usingBlock: block]
491492 }
492493
@@ -503,12 +504,12 @@ impl NSDictionary for id {
503504 rv
504505 }
505506
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 {
507508 msg_send ! [ self , keysOfEntriesPassingTest: predicate]
508509 }
509510
510511 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 {
512513 msg_send ! [ self , keysOfEntriesWithOptions: opts PassingTest : predicate]
513514 }
514515
@@ -832,8 +833,8 @@ pub trait NSURL: Sized {
832833 unsafe fn initFileURLWithPath_ ( self , path : id ) -> id ;
833834 unsafe fn fileURLWithPathComponents_ ( _: Self , path_components : id /* (NSArray<NSString*>*) */ ) -> id ;
834835 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 ;
837838 // unsafe fn fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_
838839 // unsafe fn getFileSystemRepresentation_maxLength_
839840 // unsafe fn initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_
@@ -955,10 +956,10 @@ impl NSURL for id {
955956 unsafe fn URLByResolvingAliasFileAtURL_options_error_ ( _: Self , url : id , options : NSURLBookmarkResolutionOptions , error : * mut id /* (NSError _Nullable) */ ) -> id {
956957 msg_send ! [ class!( NSURL ) , URLByResolvingAliasFileAtURL : url options: options error: error]
957958 }
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 {
959960 msg_send ! [ class!( NSURL ) , URLByResolvingBookmarkData : data options: options relativeToURL: relative_to_url bookmarkDataIsStale: is_stale error: error]
960961 }
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 {
962963 msg_send ! [ self , initByResolvingBookmarkData: data options: options relativeToURL: relative_to_url bookmarkDataIsStale: is_stale error: error]
963964 }
964965 // unsafe fn fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_
@@ -1226,7 +1227,7 @@ pub trait NSData: Sized {
12261227
12271228 unsafe fn bytes ( self ) -> * const c_void ;
12281229 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 ) , ( ) > ) ;
12301231 unsafe fn getBytes_length_ ( self , buffer : * mut c_void , length : NSUInteger ) ;
12311232 unsafe fn getBytes_range_ ( self , buffer : * mut c_void , range : NSRange ) ;
12321233 unsafe fn subdataWithRange_ ( self , range : NSRange ) -> id ;
@@ -1305,7 +1306,7 @@ impl NSData for id {
13051306 msg_send ! [ self , description]
13061307 }
13071308
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 ) , ( ) > ) {
13091310 msg_send ! [ self , enumerateByteRangesUsingBlock: block]
13101311 }
13111312
0 commit comments