diff --git a/src/components/gfx/platform/linux/font.rs b/src/components/gfx/platform/linux/font.rs index 0f4e2b3b331..900bf5b00bd 100644 --- a/src/components/gfx/platform/linux/font.rs +++ b/src/components/gfx/platform/linux/font.rs @@ -78,7 +78,7 @@ impl FontHandleMethods for FontHandle { buf: ~[u8], style: &SpecifiedFontStyle) -> Result { - let ft_ctx: FT_Library = fctx.ctx.get().ctx; + let ft_ctx: FT_Library = fctx.ctx.borrow().ctx; if ft_ctx.is_null() { return Err(()); } let face_result = do buf.as_imm_buf |bytes: *u8, len: uint| { @@ -291,7 +291,7 @@ impl<'self> FontHandle { pub fn new_from_file(fctx: &FontContextHandle, file: &str, style: &SpecifiedFontStyle) -> Result { unsafe { - let ft_ctx: FT_Library = fctx.ctx.get().ctx; + let ft_ctx: FT_Library = fctx.ctx.borrow().ctx; if ft_ctx.is_null() { return Err(()); } let mut face: FT_Face = ptr::null(); @@ -319,7 +319,7 @@ impl<'self> FontHandle { pub fn new_from_file_unstyled(fctx: &FontContextHandle, file: ~str) -> Result { unsafe { - let ft_ctx: FT_Library = fctx.ctx.get().ctx; + let ft_ctx: FT_Library = fctx.ctx.borrow().ctx; if ft_ctx.is_null() { return Err(()); } let mut face: FT_Face = ptr::null(); diff --git a/src/components/gfx/platform/linux/font_context.rs b/src/components/gfx/platform/linux/font_context.rs index 8fd427ec411..4b6c74d95c2 100644 --- a/src/components/gfx/platform/linux/font_context.rs +++ b/src/components/gfx/platform/linux/font_context.rs @@ -11,7 +11,7 @@ use freetype::freetype::{FTErrorMethods, FT_Library}; use freetype::freetype::{FT_Done_FreeType, FT_Init_FreeType}; use std::ptr; -use extra::arc::Arc; +use std::rc::Rc; #[deriving(Clone)] struct FreeTypeLibraryHandle { @@ -20,7 +20,7 @@ struct FreeTypeLibraryHandle { #[deriving(Clone)] pub struct FontContextHandle { - ctx: Arc, + ctx: Rc, } impl Drop for FreeTypeLibraryHandle { @@ -39,7 +39,7 @@ impl FontContextHandle { let result = FT_Init_FreeType(&ctx); if !result.succeeded() { fail!("Unable to initialize FreeType library"); } FontContextHandle { - ctx: Arc::new(FreeTypeLibraryHandle { ctx: ctx }), + ctx: Rc::new(FreeTypeLibraryHandle { ctx: ctx }), } } }