diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2015-01-08 19:02:22 +0100 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2015-01-08 19:02:22 +0100 |
commit | 9d7dbf7eb039d5614976a184082163bc97a319c6 (patch) | |
tree | 21d476709df58871306fe2d737e08d60c6d0e835 /src | |
parent | 181e4a1d8f12136c73add790003f3372319f82f6 (diff) | |
parent | dbe38ff49ade182711e1cb275b1af2d3eecae663 (diff) | |
download | glutin-9d7dbf7eb039d5614976a184082163bc97a319c6.tar.gz glutin-9d7dbf7eb039d5614976a184082163bc97a319c6.zip |
Merge pull request #189 from ozkriff/master
android: Updated for Rust ea6f65c5f 2015-01-06
Diffstat (limited to 'src')
-rw-r--r-- | src/android/mod.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/android/mod.rs b/src/android/mod.rs index 7e1c35d..0dbe164 100644 --- a/src/android/mod.rs +++ b/src/android/mod.rs @@ -1,6 +1,7 @@ extern crate android_glue; use libc; +use std::ffi::{CString}; use std::sync::mpsc::{Receiver, channel}; use {CreationError, Event, WindowBuilder}; use CreationError::OsError; @@ -257,12 +258,9 @@ impl Window { } pub fn get_proc_address(&self, addr: &str) -> *const () { - use std::c_str::ToCStr; - + let addr = CString::from_slice(addr.as_bytes()).as_slice_with_nul().as_ptr(); unsafe { - addr.with_c_str(|s| { - ffi::egl::GetProcAddress(s) as *const () - }) + ffi::egl::GetProcAddress(addr) as *const () } } |