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

Source-Repo: https://github.com/servo/servo
Source-Revision: 2365a903b3cad138e265ffd60e86d267bfac4a7e
This commit is contained in:
Brian J. Burg 2012-10-29 16:41:17 -07:00
parent 617c194107
commit 09b98ba68f
2 changed files with 10 additions and 2 deletions

View File

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

View File

@ -4,5 +4,14 @@ Uniscribe, Pango, or Coretext.
Currently, only harfbuzz bindings are implemented.
*/
use font::Font;
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)
}
}