Move the workaround for Issue #163 next to the typedef.

This commit is contained in:
Brian J. Burg 2012-10-29 16:41:17 -07:00
parent ada1da1073
commit 2365a903b3
2 changed files with 10 additions and 2 deletions

View file

@ -117,8 +117,7 @@ impl Font {
None => {} None => {}
} }
// XXX(Issue #163): wrong! use typedef (as commented out) let shaper = @Shaper::new(self);
let shaper = @harfbuzz::shaper::HarfbuzzShaper::new(self);
self.shaper = Some(shaper); self.shaper = Some(shaper);
shaper shaper
} }

View file

@ -4,5 +4,14 @@ Uniscribe, Pango, or Coretext.
Currently, only harfbuzz bindings are implemented. Currently, only harfbuzz bindings are implemented.
*/ */
use font::Font;
pub type Shaper/& = harfbuzz::shaper::HarfbuzzShaper; pub type Shaper/& = harfbuzz::shaper::HarfbuzzShaper;
// TODO(Issue #163): this is a workaround for static methods and
// typedefs not working well together. It should be removed.
impl Shaper {
static pub fn new(font: @Font) -> Shaper {
harfbuzz::shaper::HarfbuzzShaper::new(font)
}
}