2
2
3
3
use libc:: { c_char, c_long, c_ulong, c_void, size_t, timespec} ;
4
4
5
+ pub enum dispatch_object_s { }
6
+
5
7
// dispatch_block_t
6
8
pub type dispatch_function_t = extern fn ( * mut c_void ) ;
7
- pub type dispatch_semaphore_t = * mut ( ) ;
8
- pub type dispatch_group_t = * mut ( ) ;
9
- pub type dispatch_object_t = * mut ( ) ;
9
+ pub type dispatch_semaphore_t = * mut dispatch_object_s ;
10
+ pub type dispatch_group_t = * mut dispatch_object_s ;
11
+ pub type dispatch_object_t = * mut dispatch_object_s ;
10
12
pub type dispatch_once_t = c_long ;
11
- pub type dispatch_queue_t = * mut ( ) ;
13
+ pub type dispatch_queue_t = * mut dispatch_object_s ;
12
14
pub type dispatch_time_t = u64 ;
13
15
// dispatch_source_type_t
14
16
// dispatch_fd_t
@@ -19,12 +21,12 @@ pub type dispatch_time_t = u64;
19
21
// dispatch_io_type_t
20
22
// dispatch_io_close_flags_t
21
23
// dispatch_io_interval_flags_t
22
- pub type dispatch_queue_attr_t = * const ( ) ;
24
+ pub type dispatch_queue_attr_t = * const dispatch_object_s ;
23
25
24
26
#[ link( name = "System" , kind = "dylib" ) ]
25
27
extern {
26
- static _dispatch_main_q: ( ) ;
27
- static _dispatch_queue_attr_concurrent: ( ) ;
28
+ static _dispatch_main_q: dispatch_object_s ;
29
+ static _dispatch_queue_attr_concurrent: dispatch_object_s ;
28
30
29
31
pub fn dispatch_get_global_queue ( identifier : c_long , flags : c_ulong ) -> dispatch_queue_t ;
30
32
pub fn dispatch_queue_create ( label : * const c_char , attr : dispatch_queue_attr_t ) -> dispatch_queue_t ;
0 commit comments