Skip to content

Fixed references to std::c_str #268

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/sdl2/audio.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Audio Functions
use std::ptr;
use std::mem;
use std::c_str::{CString, ToCStr};
use std::ffi::CString;
use std::c_vec::CVec;
use std::borrow::ToOwned;
use std::num::FromPrimitive;
Expand Down Expand Up @@ -216,9 +216,9 @@ impl<T: AudioFormatNum<T>, CB: AudioCallback<T>> AudioSpecDesired<T, CB> {
samples: 0,
padding: 0,
size: 0,
callback: Some(audio_callback_marshall::<T, CB>
callback: Some(audio_callback_marshall::<T, CB>
as extern "C" fn
(arg1: *const c_void,
(arg1: *const c_void,
arg2: *const uint8_t,
arg3: c_int)),
userdata: transmute(userdata)
Expand All @@ -237,7 +237,6 @@ impl<T: AudioFormatNum<T>, CB: AudioCallback<T>> AudioSpecDesired<T, CB> {
pub fn open_audio_device(self, device: Option<&str>, iscapture: bool) -> SdlResult<AudioDevice<CB>> {
use std::mem::uninitialized;
use std::ptr::null;
use std::c_str::CString;
use libc::c_char;

let mut userdata = AudioSpecDesired::callback_to_userdata(self.callback);
Expand Down
1 change: 0 additions & 1 deletion src/sdl2/clipboard.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use SdlResult;
use get_error;
use std::c_str::ToCStr;

pub use sys::clipboard as ll;

Expand Down
2 changes: 0 additions & 2 deletions src/sdl2/filesystem.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::c_str::ToCStr;

use SdlResult;
use get_error;

Expand Down
1 change: 0 additions & 1 deletion src/sdl2/keyboard.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::collections::HashMap;
use std::num::FromPrimitive;
use std::ptr;
use std::c_str::ToCStr;

use keycode::KeyCode;
use rect::Rect;
Expand Down
1 change: 0 additions & 1 deletion src/sdl2/messagebox.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::ptr;
use std::c_str::ToCStr;

use video::Window;
use get_error;
Expand Down
1 change: 0 additions & 1 deletion src/sdl2/rwops.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::io;
use std::io::IoResult;
use std::c_str::ToCStr;
use libc::{c_void, c_int, size_t};
use get_error;
use SdlResult;
Expand Down
2 changes: 1 addition & 1 deletion src/sdl2/sdl.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::c_str::{CString, ToCStr};
use std::ffi::CString;
use std::borrow::ToOwned;

use sys::sdl as ll;
Expand Down
2 changes: 1 addition & 1 deletion src/sdl2/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Querying SDL Version
*/

use std::fmt;
use std::c_str::CString;
use std::ffi::CString;
use std::borrow::ToOwned;

pub use sys::version as ll;
Expand Down
1 change: 0 additions & 1 deletion src/sdl2/video.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use libc::{c_int, c_float, uint32_t};
use std::ptr;
use std::vec::Vec;
use std::c_str::ToCStr;

use rect::Rect;
use surface::Surface;
Expand Down