Skip to content

Commit

Permalink
Fix build errors: use extern keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuncer Ayaz committed Jul 4, 2012
1 parent 8861aba commit 7f34366
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/servo/gfx/pngsink.rs
Expand Up @@ -77,9 +77,9 @@ fn do_draw(sender: chan<AzDrawTargetRef>,

listen(|data_ch: chan<[u8]>| {

crust fn write_fn(closure: *c_void,
data: *c_uchar,
len: c_uint)
extern fn write_fn(closure: *c_void,
data: *c_uchar,
len: c_uint)

-> cairo_status_t unsafe {

Expand Down
2 changes: 1 addition & 1 deletion src/servo/platform/osmain.rs
Expand Up @@ -271,7 +271,7 @@ mod platform {
}

mod MainObj {
crust fn applicationDidFinishLaunching(this: id, _sel: SEL) {
extern fn applicationDidFinishLaunching(this: id, _sel: SEL) {
#debug("applicationDidFinishLaunching");

let fptr: *fn() = ptr::null();
Expand Down
10 changes: 5 additions & 5 deletions src/servo/text/shaper.rs
Expand Up @@ -101,7 +101,7 @@ fn shape_text(font: &Font, text: str) -> [Glyph] unsafe {
ret glyphs;
}

crust fn glyph_func(_font: *hb_font_t,
extern fn glyph_func(_font: *hb_font_t,
font_data: *c_void,
unicode: hb_codepoint_t,
_variant_selector: hb_codepoint_t,
Expand All @@ -122,10 +122,10 @@ crust fn glyph_func(_font: *hb_font_t,
} as hb_bool_t;
}

crust fn glyph_h_advance_func(_font: *hb_font_t,
font_data: *c_void,
glyph: hb_codepoint_t,
_user_data: *c_void) -> hb_position_t unsafe {
extern fn glyph_h_advance_func(_font: *hb_font_t,
font_data: *c_void,
glyph: hb_codepoint_t,
_user_data: *c_void) -> hb_position_t unsafe {
let font: *Font = reinterpret_cast(font_data);
assert font.is_not_null();

Expand Down

0 comments on commit 7f34366

Please sign in to comment.