We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 81c88d5 + e3ead0b commit 9ce2e68Copy full SHA for 9ce2e68
src/sdl2_gfx/framerate.rs
@@ -1,7 +1,7 @@
1
//! Framerate control
2
3
use libc;
4
-use libc::{c_void, uint32_t, malloc};
+use libc::{c_void, uint32_t, malloc, size_t};
5
use std::mem;
6
use sdl2::SdlResult;
7
@@ -35,7 +35,8 @@ impl FPSManager {
35
/// Create the framerate manager.
36
pub fn new() -> FPSManager {
37
unsafe {
38
- let raw = libc::malloc(mem::size_of::<ll::FPSmanager>() as u64) as *mut ll::FPSmanager;
+ let size = mem::size_of::<ll::FPSmanager>() as size_t;
39
+ let raw = libc::malloc(size) as *mut ll::FPSmanager;
40
ll::SDL_initFramerate(raw);
41
FPSManager { raw: raw }
42
}
0 commit comments