From 9bdf7a73b07d0aaf2e0b1fbe9047027ab66a9eae Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 6 Sep 2012 19:00:23 -0700 Subject: [PATCH] Fixes for language changes --- io_surface.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/io_surface.rs b/io_surface.rs index a75b53f..5a3d5de 100644 --- a/io_surface.rs +++ b/io_surface.rs @@ -1,11 +1,10 @@ // Rust bindings to the IOSurface framework on Mac OS X. -use core_foundation::base::{AbstractCFType, CFType, CFTypeOps, CFTypeRef}; -use core_foundation::base::__foreign_mod__::CFRelease; // FIXME +use core_foundation::base::{AbstractCFType, CFRelease, CFType, CFTypeOps, CFTypeRef}; use core_foundation::dictionary::{CFDictionary, CFDictionaryRef}; use core_foundation::number::CFNumber; use core_foundation::string::{CFString, CFStringRef}; -use unsafe::reinterpret_cast; +use unsafe::transmute; struct __IOSurface { private: () } pub type IOSurfaceRef = *__IOSurface; @@ -17,7 +16,7 @@ pub struct IOSurface { drop { unsafe { - CFRelease(reinterpret_cast(self.obj)); + CFRelease(transmute(copy self.obj)); } } } @@ -40,7 +39,7 @@ pub mod IOSurface { impl IOSurface : AbstractCFType { pure fn as_type_ref(&self) -> CFTypeRef { unsafe { - reinterpret_cast(self.obj) + transmute(copy self.obj) } } }