Allow deriving(Eq) for individual cases using raw pointers.

This commit is contained in:
Felix S. Klock II
2014-03-30 16:06:44 +02:00
parent c377de429b
commit 13df4d7c3c
5 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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