diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-07-21 17:20:52 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-07-26 09:53:03 -0700 |
| commit | 5aaaca0c6a837ef60260b07121f4b4c4984afc70 (patch) | |
| tree | 69fd81f9f8669b681f5cb8d7382485045b96539d /src/libstd/task | |
| parent | 7fd23e4fe26bc9d6eef9596593ba3ddbe83f4a10 (diff) | |
| download | rust-5aaaca0c6a837ef60260b07121f4b4c4984afc70.tar.gz rust-5aaaca0c6a837ef60260b07121f4b4c4984afc70.zip | |
Consolidate raw representations of rust values
This moves the raw struct layout of closures, vectors, boxes, and strings into a new `unstable::raw` module. This is meant to be a centralized location to find information for the layout of these values. As safe method, `repr`, is provided to convert a rust value to its raw representation. Unsafe methods to convert back are not provided because they are rarely used and too numerous to write an implementation for each (not much of a common pattern).
Diffstat (limited to 'src/libstd/task')
| -rw-r--r-- | src/libstd/task/local_data_priv.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/task/local_data_priv.rs b/src/libstd/task/local_data_priv.rs index d5f4973e8c7..477981c65e5 100644 --- a/src/libstd/task/local_data_priv.rs +++ b/src/libstd/task/local_data_priv.rs @@ -15,8 +15,8 @@ use libc; use local_data; use prelude::*; use ptr; -use sys; use task::rt; +use unstable::raw; use util; use super::rt::rust_task; @@ -158,7 +158,7 @@ unsafe fn get_local_map(handle: Handle) -> &mut TaskLocalMap { } unsafe fn key_to_key_value<T: 'static>(key: local_data::Key<T>) -> *libc::c_void { - let pair: sys::Closure = cast::transmute_copy(&key); + let pair: raw::Closure = cast::transmute_copy(&key); return pair.code as *libc::c_void; } |
