Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update for str::as_buf changes.

  • Loading branch information...
commit af4cb2481c60688d6b10dd8d5e2ffd6842a28384 1 parent 6020e06
@jdm jdm authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  sdl.rs
  2. +2 −2 video.rs
View
2  sdl.rs
@@ -75,7 +75,7 @@ fn get_error() -> ~str unsafe {
}
fn set_error(s: ~str) {
- str::as_buf(s, |buf| {
+ str::as_buf(s, |buf, _len| {
// FIXME: Converting sbuf to *c_char
let buf = unsafe { unsafe::reinterpret_cast(buf) };
SDL::SDL_SetError(buf)
View
4 video.rs
@@ -74,9 +74,9 @@ fn free_surface(surface: *surface) {
}
fn load_bmp(file: ~str) -> *surface unsafe {
- str::as_buf(file, |buf| {
+ str::as_buf(file, |buf, _len| {
let buf = unsafe::reinterpret_cast(buf);
- str::as_buf(~"rb", |rbbuf| {
+ str::as_buf(~"rb", |rbbuf, _len| {
let rbbuf = unsafe::reinterpret_cast(rbbuf);
SDL::SDL_LoadBMP_RW(SDL::SDL_RWFromFile(buf, rbbuf), 1 as c_int)
})
Please sign in to comment.
Something went wrong with that request. Please try again.