diff options
author | Akos Kiss <akiss@inf.u-szeged.hu> | 2015-01-20 17:09:13 +0000 |
---|---|---|
committer | Akos Kiss <akiss@inf.u-szeged.hu> | 2015-01-20 21:49:23 +0000 |
commit | 935e5a36a2bf0109c0366ff86b2636e633cda25d (patch) | |
tree | a5fdade766c6f50fd3079b77c0ff9d04dca562ce /src | |
parent | 4d12d3ea3d44a4e63297a5a4f342301ac2fa6070 (diff) | |
download | glutin-935e5a36a2bf0109c0366ff86b2636e633cda25d.tar.gz glutin-935e5a36a2bf0109c0366ff86b2636e633cda25d.zip |
`c_char` isn't always `i8`
Diffstat (limited to 'src')
-rw-r--r-- | src/x11/headless.rs | 2 | ||||
-rw-r--r-- | src/x11/window/mod.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/x11/headless.rs b/src/x11/headless.rs index 7692832..20d86e3 100644 --- a/src/x11/headless.rs +++ b/src/x11/headless.rs @@ -5,7 +5,7 @@ use libc; use std::{mem, ptr}; use super::ffi; -fn with_c_str<F, T>(s: &str, f: F) -> T where F: FnOnce(*const i8) -> T { +fn with_c_str<F, T>(s: &str, f: F) -> T where F: FnOnce(*const libc::c_char) -> T { use std::ffi::CString; let c_str = CString::from_slice(s.as_bytes()); f(c_str.as_slice_with_nul().as_ptr()) diff --git a/src/x11/window/mod.rs b/src/x11/window/mod.rs index 0f74dfe..91d7e07 100644 --- a/src/x11/window/mod.rs +++ b/src/x11/window/mod.rs @@ -24,7 +24,7 @@ fn ensure_thread_init() { }); } -fn with_c_str<F, T>(s: &str, f: F) -> T where F: FnOnce(*const i8) -> T { +fn with_c_str<F, T>(s: &str, f: F) -> T where F: FnOnce(*const libc::c_char) -> T { use std::ffi::CString; let c_str = CString::from_slice(s.as_bytes()); f(c_str.as_slice_with_nul().as_ptr()) |