Remove public exports of gl_common and libc

This commit is contained in:
Pierre Krieger 2015-11-04 11:27:50 +01:00
parent 439d25168e
commit 37262fb228
22 changed files with 29 additions and 52 deletions

View file

@ -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)
}

View file

@ -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)
}

View file

@ -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]

View file

@ -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 {

View file

@ -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 {

View file

@ -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();

View file

@ -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 {

View file

@ -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 _
}
}

View file

@ -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())))

View file

@ -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)
}

View file

@ -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();

View file

@ -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),

View file

@ -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),