@@ -732,9 +732,9 @@ unsafe fn timer_t() -> uv_timer_t {
732
732
}
733
733
734
734
// data access helpers
735
- unsafe fn get_loop_for_uv_handle ( handle : * libc :: c_void )
735
+ unsafe fn get_loop_for_uv_handle < T > ( handle : * T )
736
736
-> * libc:: c_void {
737
- ret rustrt:: rust_uv_get_loop_for_uv_handle ( handle) ;
737
+ ret rustrt:: rust_uv_get_loop_for_uv_handle ( handle as * libc :: c_void ) ;
738
738
}
739
739
unsafe fn get_stream_handle_from_connect_req ( connect : * uv_connect_t )
740
740
-> * uv_stream_t {
@@ -753,12 +753,13 @@ unsafe fn get_data_for_uv_loop(loop_ptr: *libc::c_void) -> *libc::c_void {
753
753
unsafe fn set_data_for_uv_loop ( loop_ptr : * libc:: c_void , data : * libc:: c_void ) {
754
754
rustrt:: rust_uv_set_data_for_uv_loop ( loop_ptr, data) ;
755
755
}
756
- unsafe fn get_data_for_uv_handle ( handle : * libc :: c_void ) -> * libc:: c_void {
757
- ret rustrt:: rust_uv_get_data_for_uv_handle ( handle) ;
756
+ unsafe fn get_data_for_uv_handle < T > ( handle : * T ) -> * libc:: c_void {
757
+ ret rustrt:: rust_uv_get_data_for_uv_handle ( handle as * libc :: c_void ) ;
758
758
}
759
- unsafe fn set_data_for_uv_handle ( handle : * libc:: c_void ,
760
- data : * libc:: c_void ) {
761
- rustrt:: rust_uv_set_data_for_uv_handle ( handle, data) ;
759
+ unsafe fn set_data_for_uv_handle < T , U > ( handle : * T ,
760
+ data : * U ) {
761
+ rustrt:: rust_uv_set_data_for_uv_handle ( handle as * libc:: c_void ,
762
+ data as * libc:: c_void ) ;
762
763
}
763
764
unsafe fn get_data_for_req ( req : * libc:: c_void ) -> * libc:: c_void {
764
765
ret rustrt:: rust_uv_get_data_for_req ( req) ;
0 commit comments