mirror of
https://github.com/encounter/rust-sdl2.git
synced 2026-07-10 21:18:41 -07:00
Allow deriving(Eq) for individual cases using raw pointers.
This commit is contained in:
+1
-1
@@ -71,7 +71,7 @@ pub enum SystemCursor {
|
||||
HandCursor = ll::SDL_SYSTEM_CURSOR_HAND,
|
||||
}
|
||||
|
||||
#[deriving(Eq)]
|
||||
#[deriving(Eq)] #[allow(raw_pointer_deriving)]
|
||||
pub struct Cursor {
|
||||
raw: *ll::SDL_Cursor,
|
||||
owned: bool
|
||||
|
||||
+2
-2
@@ -87,7 +87,7 @@ pub mod ll {
|
||||
pub fn SDL_MapRGBA(format: *SDL_PixelFormat, r: uint8_t, g: uint8_t, b: uint8_t, a: uint8_t) -> uint32_t;
|
||||
}
|
||||
}
|
||||
#[deriving(Eq)]
|
||||
#[deriving(Eq)] #[allow(raw_pointer_deriving)]
|
||||
pub struct Palette {
|
||||
raw: *ll::SDL_Palette
|
||||
}
|
||||
@@ -130,7 +130,7 @@ impl rand::Rand for Color {
|
||||
}
|
||||
}
|
||||
|
||||
#[deriving(Eq)]
|
||||
#[deriving(Eq)] #[allow(raw_pointer_deriving)]
|
||||
pub struct PixelFormat {
|
||||
raw: *ll::SDL_PixelFormat
|
||||
}
|
||||
|
||||
+2
-2
@@ -214,7 +214,7 @@ enum RendererParent {
|
||||
Surface(~surface::Surface),
|
||||
}
|
||||
|
||||
#[deriving(Eq)]
|
||||
#[deriving(Eq)] #[allow(raw_pointer_deriving)]
|
||||
pub struct Renderer {
|
||||
raw: *ll::SDL_Renderer,
|
||||
priv parent: RendererParent,
|
||||
@@ -522,7 +522,7 @@ pub struct TextureQuery {
|
||||
height: int
|
||||
}
|
||||
|
||||
#[deriving(Eq)]
|
||||
#[deriving(Eq)] #[allow(raw_pointer_deriving)]
|
||||
pub struct Texture {
|
||||
raw: *ll::SDL_Texture,
|
||||
owned: bool
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ pub enum SurfaceFlag {
|
||||
DontFree = ll::SDL_DONTFREE as int
|
||||
}
|
||||
|
||||
#[deriving(Eq)]
|
||||
#[deriving(Eq)] #[allow(raw_pointer_deriving)]
|
||||
pub struct Surface {
|
||||
raw: *ll::SDL_Surface,
|
||||
owned: bool
|
||||
|
||||
+1
-1
@@ -337,7 +337,7 @@ impl Drop for GLContext {
|
||||
}
|
||||
|
||||
|
||||
#[deriving(Eq)]
|
||||
#[deriving(Eq)] #[allow(raw_pointer_deriving)]
|
||||
pub struct Window {
|
||||
raw: *ll::SDL_Window,
|
||||
owned: bool
|
||||
|
||||
Reference in New Issue
Block a user