Permalink
Browse files

Update for str::as_buf changes.

  • Loading branch information...
1 parent 6020e06 commit af4cb2481c60688d6b10dd8d5e2ffd6842a28384 @jdm jdm committed Jul 24, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 sdl.rs
  2. +2 −2 video.rs
View
@@ -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
@@ -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)
})

0 comments on commit af4cb24

Please sign in to comment.