diff options
author | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-01-03 23:11:59 +0100 |
---|---|---|
committer | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-01-03 23:15:39 +0100 |
commit | 4c5e430dd3fcd38c29bfbc20dc0cc65defd33224 (patch) | |
tree | 438ed8c0ce41fa513e92a4dd0696bf4114df38fa /src/x11/window | |
parent | ebe32bb2d803bc22c4b309acbbd48f3dc2a12127 (diff) | |
download | glutin-4c5e430dd3fcd38c29bfbc20dc0cc65defd33224.tar.gz glutin-4c5e430dd3fcd38c29bfbc20dc0cc65defd33224.zip |
Update for Rustc
Diffstat (limited to 'src/x11/window')
-rw-r--r-- | src/x11/window/mod.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/x11/window/mod.rs b/src/x11/window/mod.rs index 768d480..1309fd4 100644 --- a/src/x11/window/mod.rs +++ b/src/x11/window/mod.rs @@ -57,7 +57,7 @@ impl Drop for XWindow { } } -#[deriving(Clone)] +#[derive(Clone)] pub struct WindowProxy { x: Arc<XWindow>, } @@ -302,6 +302,7 @@ impl Window { // loading the extra GLX functions let extra_functions = ffi::glx_extra::Glx::load_with(|addr| { + use std::c_str::ToCStr; addr.with_c_str(|s| { use libc; ffi::glx::GetProcAddress(s as *const u8) as *const libc::c_void @@ -355,6 +356,7 @@ impl Window { } pub fn set_title(&self, title: &str) { + use std::c_str::ToCStr; let c_title = title.to_c_str(); unsafe { ffi::XStoreName(self.x.display, self.x.window, c_title.as_ptr()); @@ -494,7 +496,7 @@ impl Window { let written = unsafe { use std::str; - let mut buffer: [u8, ..16] = [mem::uninitialized(), ..16]; + let mut buffer: [u8; 16] = [mem::uninitialized(); 16]; let raw_ev: *mut ffi::XKeyEvent = event; let count = ffi::Xutf8LookupString(self.x.ic, mem::transmute(raw_ev), mem::transmute(buffer.as_mut_ptr()), |