From 37262fb2288c38553cc8c8f36e59782273c83e7d Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Wed, 4 Nov 2015 11:27:50 +0100 Subject: Remove public exports of gl_common and libc --- src/api/android/mod.rs | 4 ++-- src/api/caca/mod.rs | 2 +- src/api/cocoa/headless.rs | 4 ++-- src/api/cocoa/mod.rs | 2 +- src/api/egl/mod.rs | 2 +- src/api/emscripten/mod.rs | 2 +- src/api/glx/mod.rs | 2 +- src/api/ios/mod.rs | 4 ++-- src/api/osmesa/mod.rs | 2 +- src/api/wayland/mod.rs | 2 +- src/api/wgl/mod.rs | 2 +- src/api/win32/mod.rs | 2 +- src/api/x11/window.rs | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) (limited to 'src/api') diff --git a/src/api/android/mod.rs b/src/api/android/mod.rs index 23440d3..3dcea90 100644 --- a/src/api/android/mod.rs +++ b/src/api/android/mod.rs @@ -263,7 +263,7 @@ impl GlContext for Window { } #[inline] - fn get_proc_address(&self, addr: &str) -> *const libc::c_void { + fn get_proc_address(&self, addr: &str) -> *const () { self.context.get_proc_address(addr) } @@ -323,7 +323,7 @@ impl GlContext for HeadlessContext { } #[inline] - fn get_proc_address(&self, addr: &str) -> *const libc::c_void { + fn get_proc_address(&self, addr: &str) -> *const () { self.0.get_proc_address(addr) } diff --git a/src/api/caca/mod.rs b/src/api/caca/mod.rs index 43742f3..687c66f 100644 --- a/src/api/caca/mod.rs +++ b/src/api/caca/mod.rs @@ -252,7 +252,7 @@ impl GlContext for Window { } #[inline] - fn get_proc_address(&self, addr: &str) -> *const libc::c_void { + fn get_proc_address(&self, addr: &str) -> *const () { self.opengl.get_proc_address(addr) } diff --git a/src/api/cocoa/headless.rs b/src/api/cocoa/headless.rs index 49b8bc3..1318185 100644 --- a/src/api/cocoa/headless.rs +++ b/src/api/cocoa/headless.rs @@ -91,7 +91,7 @@ impl GlContext for HeadlessContext { } #[inline] - fn get_proc_address(&self, _addr: &str) -> *const libc::c_void { + fn get_proc_address(&self, _addr: &str) -> *const () { let symbol_name: CFString = _addr.parse().unwrap(); let framework_name: CFString = "com.apple.opengl".parse().unwrap(); let framework = unsafe { @@ -100,7 +100,7 @@ impl GlContext for HeadlessContext { let symbol = unsafe { CFBundleGetFunctionPointerForName(framework, symbol_name.as_concrete_TypeRef()) }; - symbol as *const libc::c_void + symbol as *const () } #[inline] diff --git a/src/api/cocoa/mod.rs b/src/api/cocoa/mod.rs index c6d53d4..c1b22c9 100644 --- a/src/api/cocoa/mod.rs +++ b/src/api/cocoa/mod.rs @@ -777,7 +777,7 @@ impl GlContext for Window { } } - fn get_proc_address(&self, addr: &str) -> *const libc::c_void { + fn get_proc_address(&self, addr: &str) -> *const () { let symbol_name: CFString = FromStr::from_str(addr).unwrap(); let framework_name: CFString = FromStr::from_str("com.apple.opengl").unwrap(); let framework = unsafe { diff --git a/src/api/egl/mod.rs b/src/api/egl/mod.rs index 0c0ec1f..53f8fc9 100644 --- a/src/api/egl/mod.rs +++ b/src/api/egl/mod.rs @@ -284,7 +284,7 @@ impl GlContext for Context { unsafe { self.egl.GetCurrentContext() == self.context } } - fn get_proc_address(&self, addr: &str) -> *const libc::c_void { + fn get_proc_address(&self, addr: &str) -> *const () { let addr = CString::new(addr.as_bytes()).unwrap(); let addr = addr.as_ptr(); unsafe { diff --git a/src/api/emscripten/mod.rs b/src/api/emscripten/mod.rs index 91304f0..61d8c8c 100644 --- a/src/api/emscripten/mod.rs +++ b/src/api/emscripten/mod.rs @@ -221,7 +221,7 @@ impl GlContext for Window { true // FIXME: } - fn get_proc_address(&self, addr: &str) -> *const libc::c_void { + fn get_proc_address(&self, addr: &str) -> *const () { let addr = CString::new(addr.as_bytes()).unwrap(); let addr = addr.as_ptr(); diff --git a/src/api/glx/mod.rs b/src/api/glx/mod.rs index a7f8662..61a7d2f 100644 --- a/src/api/glx/mod.rs +++ b/src/api/glx/mod.rs @@ -82,7 +82,7 @@ impl GlContext for Context { unsafe { self.glx.GetCurrentContext() == self.context } } - fn get_proc_address(&self, addr: &str) -> *const libc::c_void { + fn get_proc_address(&self, addr: &str) -> *const () { let addr = CString::new(addr.as_bytes()).unwrap(); let addr = addr.as_ptr(); unsafe { diff --git a/src/api/ios/mod.rs b/src/api/ios/mod.rs index 52eebbf..852d97c 100644 --- a/src/api/ios/mod.rs +++ b/src/api/ios/mod.rs @@ -384,12 +384,12 @@ impl GlContext for Window { false } - fn get_proc_address(&self, addr: &str) -> *const libc::c_void { + fn get_proc_address(&self, addr: &str) -> *const () { let addr_c = CString::new(addr).unwrap(); let path = CString::new("/System/Library/Frameworks/OpenGLES.framework/OpenGLES").unwrap(); unsafe { let lib = dlopen(path.as_ptr(), RTLD_LAZY | RTLD_GLOBAL); - dlsym(lib, addr_c.as_ptr()) + dlsym(lib, addr_c.as_ptr()) as *const _ } } diff --git a/src/api/osmesa/mod.rs b/src/api/osmesa/mod.rs index 065ffc6..02c43a1 100644 --- a/src/api/osmesa/mod.rs +++ b/src/api/osmesa/mod.rs @@ -106,7 +106,7 @@ impl GlContext for OsMesaContext { unsafe { osmesa_sys::OSMesaGetCurrentContext() == self.context } } - fn get_proc_address(&self, addr: &str) -> *const libc::c_void { + fn get_proc_address(&self, addr: &str) -> *const () { unsafe { let c_str = CString::new(addr.as_bytes().to_vec()).unwrap(); mem::transmute(osmesa_sys::OSMesaGetProcAddress(mem::transmute(c_str.as_ptr()))) diff --git a/src/api/wayland/mod.rs b/src/api/wayland/mod.rs index 81acbf0..2877713 100644 --- a/src/api/wayland/mod.rs +++ b/src/api/wayland/mod.rs @@ -456,7 +456,7 @@ impl GlContext for Window { } #[inline] - fn get_proc_address(&self, addr: &str) -> *const libc::c_void { + fn get_proc_address(&self, addr: &str) -> *const () { self.context.get_proc_address(addr) } diff --git a/src/api/wgl/mod.rs b/src/api/wgl/mod.rs index f064931..0f6a944 100644 --- a/src/api/wgl/mod.rs +++ b/src/api/wgl/mod.rs @@ -171,7 +171,7 @@ impl GlContext for Context { unsafe { gl::wgl::GetCurrentContext() == self.context.0 as *const libc::c_void } } - fn get_proc_address(&self, addr: &str) -> *const libc::c_void { + fn get_proc_address(&self, addr: &str) -> *const () { let addr = CString::new(addr.as_bytes()).unwrap(); let addr = addr.as_ptr(); diff --git a/src/api/win32/mod.rs b/src/api/win32/mod.rs index 4fb3635..d85ef09 100644 --- a/src/api/win32/mod.rs +++ b/src/api/win32/mod.rs @@ -365,7 +365,7 @@ impl GlContext for Window { } #[inline] - fn get_proc_address(&self, addr: &str) -> *const libc::c_void { + fn get_proc_address(&self, addr: &str) -> *const () { match self.context { Context::Wgl(ref c) => c.get_proc_address(addr), Context::Egl(ref c) => c.get_proc_address(addr), diff --git a/src/api/x11/window.rs b/src/api/x11/window.rs index 72b9b33..b964fed 100644 --- a/src/api/x11/window.rs +++ b/src/api/x11/window.rs @@ -807,7 +807,7 @@ impl GlContext for Window { } #[inline] - fn get_proc_address(&self, addr: &str) -> *const libc::c_void { + fn get_proc_address(&self, addr: &str) -> *const () { match self.x.context { Context::Glx(ref ctxt) => ctxt.get_proc_address(addr), Context::Egl(ref ctxt) => ctxt.get_proc_address(addr), -- cgit v1.2.3