summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2012-08-27 16:08:17 -0700
committerNiko Matsakis <niko@alum.mit.edu>2012-08-27 19:56:16 -0700
commit0a01d82f6f3e33ca742c8e985d2a4819faeafe40 (patch)
treee6a3bfdfac3be000e62bcb2f5c8b3e1acbdc7a45 /src/libstd
parentff513b1bcd0d872899b453cb3542e7a0924d5bde (diff)
downloadrust-0a01d82f6f3e33ca742c8e985d2a4819faeafe40.tar.gz
rust-0a01d82f6f3e33ca742c8e985d2a4819faeafe40.zip
preliminary work on making future's sendable
also various improvements to the ptr casting fns:
- rename assimilate() to to_unsafe_ptr() (fixes #3110)
- introduce `unsafe::copy_lifetime()` to copy the lifetime from one ptr to another
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/uv_ll.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/uv_ll.rs b/src/libstd/uv_ll.rs
index 1e7c2c2c824..aed7c316770 100644
--- a/src/libstd/uv_ll.rs
+++ b/src/libstd/uv_ll.rs
@@ -21,8 +21,8 @@
  */
 
 import libc::size_t;
-import ptr::assimilate;
 import comm = core::comm;
+import ptr::to_unsafe_ptr;
 
 // libuv struct mappings
 type uv_ip4_addr = {
@@ -824,7 +824,7 @@ unsafe fn ip4_name(src: &sockaddr_in) -> ~str {
     let dst: ~[u8] = ~[0u8,0u8,0u8,0u8,0u8,0u8,0u8,0u8,
                      0u8,0u8,0u8,0u8,0u8,0u8,0u8,0u8];
     do vec::as_buf(dst) |dst_buf, size| {
-        rustrt::rust_uv_ip4_name(assimilate(src),
+        rustrt::rust_uv_ip4_name(to_unsafe_ptr(src),
                                  dst_buf, size as libc::size_t);
         // seems that checking the result of uv_ip4_name
         // doesn't work too well..
@@ -844,7 +844,7 @@ unsafe fn ip6_name(src: &sockaddr_in6) -> ~str {
                        0u8,0u8,0u8,0u8,0u8,0u8,0u8,0u8,
                        0u8,0u8,0u8,0u8,0u8,0u8];
     do vec::as_buf(dst) |dst_buf, size| {
-        let src_unsafe_ptr = assimilate(src);
+        let src_unsafe_ptr = to_unsafe_ptr(src);
         log(debug, fmt!("val of src *sockaddr_in6: %? sockaddr_in6: %?",
                         src_unsafe_ptr, src));
         let result = rustrt::rust_uv_ip6_name(src_unsafe_ptr,