From cb5b9a477ccd2d04f549e1107af350749d414bba Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 9 Jul 2013 17:25:28 -0700 Subject: Rename local_data methods/types for less keystrokes --- src/libstd/task/local_data_priv.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libstd/task') diff --git a/src/libstd/task/local_data_priv.rs b/src/libstd/task/local_data_priv.rs index 07eebea4a62..17d534cfd03 100644 --- a/src/libstd/task/local_data_priv.rs +++ b/src/libstd/task/local_data_priv.rs @@ -12,7 +12,7 @@ use cast; use libc; -use local_data::LocalDataKey; +use local_data; use managed::raw::BoxRepr; use prelude::*; use ptr; @@ -131,7 +131,7 @@ unsafe fn get_local_map(handle: Handle) -> &mut TaskLocalMap { } } -unsafe fn key_to_key_value(key: LocalDataKey) -> *libc::c_void { +unsafe fn key_to_key_value(key: local_data::Key) -> *libc::c_void { let pair: sys::Closure = cast::transmute(key); return pair.code as *libc::c_void; } @@ -155,7 +155,7 @@ unsafe fn transmute_back<'a, T>(data: &'a TLSValue) -> (*BoxRepr, &'a T) { } pub unsafe fn local_pop(handle: Handle, - key: LocalDataKey) -> Option { + key: local_data::Key) -> Option { // If you've never seen horrendously unsafe code written in rust before, // just feel free to look a bit farther... let map = get_local_map(handle); @@ -203,7 +203,7 @@ pub unsafe fn local_pop(handle: Handle, } pub unsafe fn local_get(handle: Handle, - key: LocalDataKey, + key: local_data::Key, f: &fn(Option<&T>) -> U) -> U { // This does in theory take multiple mutable loans on the tls map, but the // references returned are never removed because the map is only increasing @@ -227,7 +227,7 @@ pub unsafe fn local_get(handle: Handle, // FIXME(#7673): This shouldn't require '@', it should use '~' pub unsafe fn local_set(handle: Handle, - key: LocalDataKey<@T>, + key: local_data::Key<@T>, data: @T) { let map = get_local_map(handle); let keyval = key_to_key_value(key); -- cgit 1.4.1-3-g733a5