diff --git a/gl2.rs b/gl2.rs index 5f77af2..ae57305 100644 --- a/gl2.rs +++ b/gl2.rs @@ -888,8 +888,8 @@ pub fn scissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei) { } pub fn shader_source(shader: GLuint, strings: &[&[u8]]) { - let pointers = strings.map(|string| (*string).as_ptr()); - let lengths = strings.map(|string| string.len() as GLint); + let pointers: ~[*u8] = strings.iter().map(|string| (*string).as_ptr()).collect(); + let lengths: ~[GLint] = strings.iter().map(|string| string.len() as GLint).collect(); unsafe { glShaderSource(shader, pointers.len() as GLsizei, pointers.as_ptr() as **GLchar, lengths.as_ptr()); diff --git a/glx.rs b/glx.rs index 7e4bfd2..e6d257e 100644 --- a/glx.rs +++ b/glx.rs @@ -14,13 +14,13 @@ use std::libc::{c_char, c_int, c_ulong}; // Types pub struct Display { - priv opaque: (), + opaque: (), } pub type GLXDrawable = c_ulong; pub struct __GLXFBConfig { - priv opaque: (), + opaque: (), } pub type GLXFBConfig = *__GLXFBConfig; @@ -30,7 +30,7 @@ pub type GLXPixmap = c_ulong; pub type Pixmap = c_ulong; pub struct __XVisualInfo { - priv opaque: (), + opaque: (), } pub type XVisualInfo = *__XVisualInfo;