Merge pull request #427 from bvssvni/osxfix

Fix compiler errors on OSX
This commit is contained in:
Felix Kaaman 2015-05-04 17:04:13 +02:00
commit 0a93e949fa

View file

@ -10,6 +10,7 @@ use core_foundation::string::CFString;
use core_foundation::bundle::{CFBundleGetBundleWithIdentifier, CFBundleGetFunctionPointerForName}; use core_foundation::bundle::{CFBundleGetBundleWithIdentifier, CFBundleGetFunctionPointerForName};
use cocoa::base::{id, nil}; use cocoa::base::{id, nil};
use cocoa::appkit::*; use cocoa::appkit::*;
use PixelFormat;
mod gl { mod gl {
include!(concat!(env!("OUT_DIR"), "/gl_bindings.rs")); include!(concat!(env!("OUT_DIR"), "/gl_bindings.rs"));
@ -83,7 +84,7 @@ impl GlContext for HeadlessContext {
unimplemented!() unimplemented!()
} }
fn get_proc_address(&self, _addr: &str) -> *const () { fn get_proc_address(&self, _addr: &str) -> *const libc::c_void {
let symbol_name: CFString = _addr.parse().unwrap(); let symbol_name: CFString = _addr.parse().unwrap();
let framework_name: CFString = "com.apple.opengl".parse().unwrap(); let framework_name: CFString = "com.apple.opengl".parse().unwrap();
let framework = unsafe { let framework = unsafe {
@ -92,7 +93,7 @@ impl GlContext for HeadlessContext {
let symbol = unsafe { let symbol = unsafe {
CFBundleGetFunctionPointerForName(framework, symbol_name.as_concrete_TypeRef()) CFBundleGetFunctionPointerForName(framework, symbol_name.as_concrete_TypeRef())
}; };
symbol as *const () symbol as *const libc::c_void
} }
fn swap_buffers(&self) { fn swap_buffers(&self) {