Created
August 24, 2012 23:10
-
-
Save dbp/3456960 to your computer and use it in GitHub Desktop.
visiting vectors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn visit_evec_uniq(_mtbl: uint, _inner: *tydesc) -> bool { | |
self.out += ~"~["; | |
self.align_to::<~[u8]>(); | |
self.visit_unboxed_vec(_mtbl, _inner); | |
self.bump_past::<~[u8]>(); | |
self.out += ~"]"; | |
true | |
} | |
fn visit_unboxed_vec(_mtbl: uint, _inner: *tydesc) -> bool { | |
error!("visiting unboxed vec"); | |
let uvr: unboxed_vec_repr; | |
unsafe { | |
let p = *(self.ptr as *u8); // c_void is uncopiable | |
uvr = *(p as *unboxed_vec_repr); | |
} | |
error!("%?", uvr); | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment