mirror of
https://github.com/servo/servo.git
synced 2025-08-02 04:00:32 +01:00
Fixed vector syntax errors and reordered crate compilation
This commit is contained in:
parent
7d06862ee1
commit
e4edb86df9
4 changed files with 10 additions and 9 deletions
|
@ -31,7 +31,8 @@ SERVO_DEPS = \
|
|||
$(NULL)
|
||||
CHECK_DEPS =
|
||||
CLEAN_DEPS =
|
||||
AZURE_DEPS =
|
||||
AZURE_DEPS = \
|
||||
src/rust-geom/libgeom.dummy
|
||||
|
||||
ifeq ($(OSTYPE),darwin)
|
||||
SERVO_DEPS += src/rust-cocoa/libcocoa.dummy
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 577df7b9e475562c38405eef60cda5e38a0840b6
|
||||
Subproject commit da98863da36697eadafea8a6544f0f4107534579
|
|
@ -28,7 +28,7 @@ A font handle. Layout can use this to calculate glyph metrics
|
|||
and the renderer can use it to render text.
|
||||
"]
|
||||
class Font {
|
||||
let fontbuf: @[u8];
|
||||
let fontbuf: @~[u8];
|
||||
let cairo_font: *cairo_scaled_font_t;
|
||||
let font_dtor: fn@();
|
||||
|
||||
|
@ -41,7 +41,7 @@ class Font {
|
|||
self.font_dtor = font_dtor;
|
||||
}
|
||||
|
||||
fn buf() -> @[u8] {
|
||||
fn buf() -> @~[u8] {
|
||||
self.fontbuf
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ class Font {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_cairo_font(buf: &[u8]) -> (*cairo_scaled_font_t, fn@()) {
|
||||
fn get_cairo_font(buf: &~[u8]) -> (*cairo_scaled_font_t, fn@()) {
|
||||
|
||||
import libc::c_double;
|
||||
import azure::cairo;
|
||||
|
@ -170,7 +170,7 @@ fn get_cairo_font(buf: &[u8]) -> (*cairo_scaled_font_t, fn@()) {
|
|||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
fn get_cairo_face(buf: &[u8]) -> (*cairo_font_face_t, fn@()) {
|
||||
fn get_cairo_face(buf: &~[u8]) -> (*cairo_font_face_t, fn@()) {
|
||||
import freetype = azure::freetype;
|
||||
import freetype::{ FT_Error, FT_Library, FT_Face, FT_Long };
|
||||
import freetype::bindgen::{
|
||||
|
@ -307,7 +307,7 @@ fn get_cairo_face_should_fail_and_not_leak_if_font_cant_be_created() {
|
|||
#[test];
|
||||
#[should_fail];
|
||||
|
||||
get_cairo_face(&[0u8, 1u8, 2u8, 3u8]);
|
||||
get_cairo_face(&~[0u8, 1u8, 2u8, 3u8]);
|
||||
}
|
||||
|
||||
fn get_cairo_face_should_return_a_new_face_and_dtor() {
|
||||
|
|
|
@ -65,7 +65,7 @@ class FreeTypeNativeFont/& {
|
|||
}
|
||||
}
|
||||
|
||||
fn create(lib: FT_Library, buf: &[u8]) -> result<FreeTypeNativeFont, ()> {
|
||||
fn create(lib: FT_Library, buf: &~[u8]) -> result<FreeTypeNativeFont, ()> {
|
||||
assert lib.is_not_null();
|
||||
let face: FT_Face = null();
|
||||
ret vec_as_buf(*buf) {|cbuf|
|
||||
|
@ -106,7 +106,7 @@ fn with_lib(f: fn@(FT_Library)) {
|
|||
#[test]
|
||||
fn create_should_return_err_if_buf_is_bogus() {
|
||||
with_lib { |lib|
|
||||
let buf = &[];
|
||||
let buf = &~[];
|
||||
assert create(lib, buf).is_err();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue