Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change ~str params to &str #55

Merged
merged 1 commit into from Sep 10, 2013
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Change ~str params to &str

  • Loading branch information
pshc committed Sep 8, 2013
commit 7fc538c238d640f7bf191b6d236405db33873cb9
6 gl2.rs
@@ -389,7 +389,7 @@ pub fn attach_shader(program: GLuint, shader: GLuint) {
}

#[fixed_stack_segment]
pub fn bind_attrib_location(program: GLuint, index: GLuint, name: ~str) {
pub fn bind_attrib_location(program: GLuint, index: GLuint, name: &str) {
unsafe {
do name.to_c_str().with_ref |cstr| {
glBindAttribLocation(program, index, cstr);
@@ -748,7 +748,7 @@ pub fn gen_vertex_arrays(n: GLsizei) -> ~[GLuint] {
}

#[fixed_stack_segment]
pub fn get_attrib_location(program: GLuint, name: ~str) -> c_int {
pub fn get_attrib_location(program: GLuint, name: &str) -> c_int {
unsafe {
do name.to_c_str().with_ref |name_bytes| {
glGetAttribLocation(program, name_bytes as *GLchar)
@@ -829,7 +829,7 @@ pub fn get_shader_iv(shader: GLuint, pname: GLenum) -> GLint {
}

#[fixed_stack_segment]
pub fn get_uniform_location(program: GLuint, name: ~str) -> c_int {
pub fn get_uniform_location(program: GLuint, name: &str) -> c_int {
unsafe {
do name.to_c_str().with_ref |name_bytes| {
glGetUniformLocation(program, name_bytes as *GLchar)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.