servo: Build fixes for latest rustc changes.

Source-Repo: https://github.com/servo/servo
Source-Revision: 57a231ff943e5023d15323ab3aae36da30d5448c
This commit is contained in:
Josh Matthews 2012-07-04 17:32:22 -04:00
Родитель 7022217dae
Коммит e86bdf2a02
5 изменённых файлов: 16 добавлений и 15 удалений

Просмотреть файл

@ -90,7 +90,7 @@ src/ragel/ragel/ragel:
$(MAKE) -C src/ragel
src/harfbuzz/src/.libs/libharfbuzz.a: src/ragel/ragel/ragel
$(MAKE) -C src/harfbuzz PATH=$(PATH):$(BUILD_DIR)/src/ragel/ragel CXXFLAGS=-fPIC LDFLAGS=-fPIC
$(MAKE) -C src/harfbuzz PATH=$(PATH):$(BUILD_DIR)/src/ragel/ragel CXXFLAGS=-fPIC LDFLAGS="-fPIC -lstdc++"
src/mozjs/libjs_static.a:
$(MAKE) -C src/mozjs
@ -133,7 +133,7 @@ check-rust-mozjs: src/mozjs/libjs_static.a
.PHONY: check-rust-azure
check-rust-azure: $(AZURE_DEPS)
RUSTFLAGS="-L ../rust-cocoa" $(MAKE) check -C src/rust-azure
RUSTFLAGS="-L ../rust-cocoa -L ../rust-geom" $(MAKE) check -C src/rust-azure
.PHONY: check-rust-sdl
check-rust-sdl:

Просмотреть файл

@ -284,13 +284,13 @@ mod platform {
#debug("getting osmain fptr: %?", fptr);
unsafe {
// FIXME: We probably don't want to run the main routine in a crust function
// FIXME: We probably don't want to run the main routine in a foreign function
(*fptr)();
}
}
fn create(f: fn()) -> id {
let NSObject = str::as_c_str("NSObject", |s| ojc::objc_getClass(s));
let NSObject = str::as_c_str("NSObject", |s| objc::objc_getClass(s));
let MainObj = str::as_c_str("MainObj", |s| {
objc::objc_allocateClassPair(NSObject, s, 0 as libc::size_t)
});

Просмотреть файл

@ -222,7 +222,7 @@ mod cocoa {
}
#[cfg(target_os = "macos")]
fn get_cairo_face(buf: &[u8]) -> (*cairo_font_face_t, fn@()) {
fn get_cairo_face(buf: &~[u8]) -> (*cairo_font_face_t, fn@()) {
import unsafe::reinterpret_cast;
import libc::size_t;
import cocoa::cocoa;
@ -296,7 +296,7 @@ fn should_get_glyph_advance() {
fn should_be_able_to_create_instances_in_multiple_threads() {
#[test];
iter::repeat(10u, || task::spawn(|| {create_test_font();}));
for iter::repeat(10u) {do task::spawn {create_test_font();}}
}
fn get_cairo_face_should_fail_and_not_leak_if_font_cant_be_created() {

Просмотреть файл

@ -48,12 +48,12 @@ class QuartzNativeFont/& {
}
}
fn create(buf: &[u8]) -> result<QuartzNativeFont, ()> {
let fontprov = vec::as_buf(*buf, |cbuf| {
fn create(buf: [u8]) -> result<QuartzNativeFont, ()> {
let fontprov = vec::as_buf(buf, |cbuf| {
CGDataProviderCreateWithData(
null(),
unsafe { reinterpret_cast(cbuf) },
(*buf).len() as size_t,
buf.len() as size_t,
null())
});
// FIXME: Error handling
@ -70,6 +70,7 @@ fn with_test_native_font(f: fn@(nf: &NativeFont)) {
import unwrap_result = result::unwrap;
let buf = test_font_bin();
let font = unwrap_result(create(&buf));
let res = create(buf);
let font = unwrap_result(res);
f(&font);
}

Просмотреть файл

@ -102,11 +102,11 @@ fn shape_text(font: &Font, text: str) -> [Glyph] unsafe {
}
extern fn glyph_func(_font: *hb_font_t,
font_data: *c_void,
unicode: hb_codepoint_t,
_variant_selector: hb_codepoint_t,
glyph: *mut hb_codepoint_t,
_user_data: *c_void) -> hb_bool_t unsafe {
font_data: *c_void,
unicode: hb_codepoint_t,
_variant_selector: hb_codepoint_t,
glyph: *mut hb_codepoint_t,
_user_data: *c_void) -> hb_bool_t unsafe {
let font: *Font = reinterpret_cast(font_data);
assert font.is_not_null();