diff --git a/Cargo.toml b/Cargo.toml index 06556447..8fb11485 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ name = "sdl2" description = "SDL2 bindings for Rust" repository = "https://github.com/AngryLawyer/rust-sdl2" documentation = "http://angrylawyer.github.io/rust-sdl2/sdl2/" -version = "0.10.0" +version = "0.11.0" license = "MIT" authors = [ "Tony Aldridge " ] keywords = ["SDL", "windowing", "graphics"] diff --git a/README.md b/README.md index 3860e38d..be2b0659 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ download through Crates.io: ```toml [dependencies] - sdl2 = "0.10" + sdl2 = "0.11" ``` Alternatively, pull it from GitHub @@ -138,7 +138,7 @@ bindings: let sdl_context = sdl2::init().unwrap(); let video_subsystem = sdl_context.video().unwrap(); -gl::load_with(|name| video_subsystem.gl_get_proc_address(name) as *const _); +gl::load_with(|name| video_subsystem.gl_get_proc_address(name)); ``` Note that these bindings are very raw, and many of the calls will require diff --git a/sdl2-sys/Cargo.toml b/sdl2-sys/Cargo.toml index 0133dbb2..7e23edac 100644 --- a/sdl2-sys/Cargo.toml +++ b/sdl2-sys/Cargo.toml @@ -15,7 +15,7 @@ path = "src/lib.rs" [dependencies] num = "0.1" -libc = "0.2.1" +libc = "0.2" [build-dependencies.pkg-config] version = "0.3" diff --git a/src/sdl2/video.rs b/src/sdl2/video.rs index f0a9081d..51d24bf7 100644 --- a/src/sdl2/video.rs +++ b/src/sdl2/video.rs @@ -1,4 +1,4 @@ -use libc::{c_void, c_int, c_float, uint32_t}; +use libc::{c_int, c_float, uint32_t}; use std::ffi::{CStr, CString}; use std::mem; use std::ops::{Deref, DerefMut}; @@ -620,9 +620,9 @@ impl VideoSubsystem { /// Gets the pointer to the named OpenGL function. /// /// This is useful for OpenGL wrappers such as [`gl-rs`](https://github.com/bjz/gl-rs). - pub fn gl_get_proc_address(&self, procname: &str) -> *const c_void { + pub fn gl_get_proc_address(&self, procname: &str) -> *const () { match CString::new(procname) { - Ok(procname) => unsafe { ll::SDL_GL_GetProcAddress(procname.as_ptr()) }, + Ok(procname) => unsafe { ll::SDL_GL_GetProcAddress(procname.as_ptr()) as *const () }, // string contains a nul byte - it won't match anything. Err(_) => ptr::null() }