@@ -145,7 +145,7 @@ fn connect(-input_ip: ip::ip_addr, port: uint,
145
145
// we can send into the interact cb to be handled in libuv..
146
146
log ( debug, fmt ! ( "stream_handle_ptr outside interact %?" ,
147
147
stream_handle_ptr) ) ;
148
- do iotask:: interact ( iotask) |loop_ptr| {
148
+ do iotask:: interact ( iotask) |loop_ptr| unsafe {
149
149
log ( debug, ~"in interact cb for tcp client connect..");
150
150
log(debug, fmt!(" stream_handle_ptr in interact %?",
151
151
stream_handle_ptr) ) ;
@@ -571,7 +571,7 @@ fn listen(-host_ip: ip::ip_addr, port: uint, backlog: uint,
571
571
-> result:: result<( ) , tcp_listen_err_data> unsafe {
572
572
do listen_common ( host_ip, port, backlog, iotask, on_establish_cb)
573
573
// on_connect_cb
574
- |handle| {
574
+ |handle| unsafe {
575
575
let server_data_ptr = uv:: ll:: get_data_for_uv_handle ( handle)
576
576
as * tcp_listen_fc_data ;
577
577
let new_conn = new_tcp_conn ( handle) ;
@@ -608,7 +608,7 @@ fn listen_common(-host_ip: ip::ip_addr, port: uint, backlog: uint,
608
608
// tcp::connect (because the iotask::interact cb isn't
609
609
// nested within a core::comm::listen block)
610
610
let loc_ip = copy ( host_ip) ;
611
- do iotask:: interact ( iotask) |loop_ptr| {
611
+ do iotask:: interact ( iotask) |loop_ptr| unsafe {
612
612
match uv:: ll:: tcp_init ( loop_ptr, server_stream_ptr) {
613
613
0i32 => {
614
614
uv:: ll:: set_data_for_uv_handle (
@@ -660,7 +660,7 @@ fn listen_common(-host_ip: ip::ip_addr, port: uint, backlog: uint,
660
660
} ;
661
661
match setup_result {
662
662
some( err_data) => {
663
- do iotask:: interact ( iotask) |loop_ptr| {
663
+ do iotask:: interact ( iotask) |loop_ptr| unsafe {
664
664
log ( debug, fmt ! ( "tcp::listen post-kill recv hl interact %?" ,
665
665
loop_ptr) ) ;
666
666
( * server_data_ptr) . active = false ;
@@ -687,7 +687,7 @@ fn listen_common(-host_ip: ip::ip_addr, port: uint, backlog: uint,
687
687
none => {
688
688
on_establish_cb ( kill_ch) ;
689
689
let kill_result = core:: comm:: recv ( kill_po) ;
690
- do iotask:: interact ( iotask) |loop_ptr| {
690
+ do iotask:: interact ( iotask) |loop_ptr| unsafe {
691
691
log ( debug, fmt ! ( "tcp::listen post-kill recv hl interact %?" ,
692
692
loop_ptr) ) ;
693
693
( * server_data_ptr) . active = false ;
@@ -844,7 +844,7 @@ fn tear_down_socket_data(socket_data: @tcp_socket_data) unsafe {
844
844
} ;
845
845
let close_data_ptr = ptr:: addr_of ( close_data) ;
846
846
let stream_handle_ptr = ( * socket_data) . stream_handle_ptr ;
847
- do iotask:: interact ( ( * socket_data) . iotask ) |loop_ptr| {
847
+ do iotask:: interact ( ( * socket_data) . iotask ) |loop_ptr| unsafe {
848
848
log ( debug, fmt ! ( "interact dtor for tcp_socket stream %? loop %?" ,
849
849
stream_handle_ptr, loop_ptr) ) ;
850
850
uv:: ll:: set_data_for_uv_handle ( stream_handle_ptr,
@@ -902,7 +902,7 @@ fn read_stop_common_impl(socket_data: *tcp_socket_data) ->
902
902
let stream_handle_ptr = ( * socket_data) . stream_handle_ptr ;
903
903
let stop_po = core:: comm:: port :: < option < tcp_err_data > > ( ) ;
904
904
let stop_ch = core:: comm:: chan ( stop_po) ;
905
- do iotask:: interact ( ( * socket_data) . iotask ) |loop_ptr| {
905
+ do iotask:: interact ( ( * socket_data) . iotask ) |loop_ptr| unsafe {
906
906
log ( debug, ~"in interact cb for tcp:: read_stop") ;
907
907
match uv:: ll:: read_stop ( stream_handle_ptr as * uv:: ll:: uv_stream_t ) {
908
908
0i32 => {
@@ -930,7 +930,7 @@ fn read_start_common_impl(socket_data: *tcp_socket_data)
930
930
let start_po = core:: comm:: port :: < option < uv:: ll:: uv_err_data > > ( ) ;
931
931
let start_ch = core:: comm:: chan ( start_po) ;
932
932
log ( debug, ~"in tcp:: read_start before interact loop ") ;
933
- do iotask:: interact ( ( * socket_data) . iotask ) |loop_ptr| {
933
+ do iotask:: interact ( ( * socket_data) . iotask ) |loop_ptr| unsafe {
934
934
log ( debug, fmt ! ( "in tcp::read_start interact cb %?" , loop_ptr) ) ;
935
935
match uv:: ll:: read_start ( stream_handle_ptr as * uv:: ll:: uv_stream_t ,
936
936
on_alloc_cb,
@@ -970,7 +970,7 @@ fn write_common_impl(socket_data_ptr: *tcp_socket_data,
970
970
result_ch: core:: comm:: chan ( result_po)
971
971
} ;
972
972
let write_data_ptr = ptr:: addr_of ( write_data) ;
973
- do iotask:: interact ( ( * socket_data_ptr) . iotask ) |loop_ptr| {
973
+ do iotask:: interact ( ( * socket_data_ptr) . iotask ) |loop_ptr| unsafe {
974
974
log ( debug, fmt ! ( "in interact cb for tcp::write %?" , loop_ptr) ) ;
975
975
match uv:: ll:: write ( write_req_ptr,
976
976
stream_handle_ptr,
0 commit comments