Skip to content

Commit

Permalink
Rust upgrade for android
Browse files Browse the repository at this point in the history
  • Loading branch information
larsbergstrom committed Mar 18, 2014
1 parent 412b0ef commit 6365b76
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Makefile.in
Expand Up @@ -35,7 +35,7 @@ ifdef CFG_DISABLE_OPTIMIZE
$(info cfg: disabling rustc optimization (CFG_DISABLE_OPTIMIZE))
CFG_RUSTC_FLAGS +=
else
CFG_RUSTC_FLAGS += -O -Z no-debug-borrows
CFG_RUSTC_FLAGS += -O
endif

CFG_RUSTC_FLAGS += -g
Expand Down Expand Up @@ -326,7 +326,7 @@ servo: $(DEPS_servo)
else
servo: $(DEPS_servo)
@$(call E, compile: $@)
$(Q)$(RUSTC) $(RFLAGS_servo) -Z gen-crate-map -o $@ $< --crate-type lib
$(Q)$(RUSTC) $(RFLAGS_servo) -C gen-crate-map -o $@ $< --crate-type lib
endif

# Darwin app packaging
Expand Down
2 changes: 1 addition & 1 deletion configure
Expand Up @@ -385,7 +385,7 @@ case ${TARGET_OSTYPE} in
probe CFG_RANLIB arm-linux-androideabi-ranlib

export PATH=${OLD_PATH}
CFG_RUSTC_FLAGS="--target=${CFG_TARGET_TRIPLES} --android-cross-path=${CFG_ANDROID_CROSS_PATH}"
CFG_RUSTC_FLAGS="--target=${CFG_TARGET_TRIPLES} -C android-cross-path=${CFG_ANDROID_CROSS_PATH}"
;;
*)
CFG_PATH=$PATH
Expand Down
6 changes: 3 additions & 3 deletions src/components/gfx/platform/android/font.rs
Expand Up @@ -102,7 +102,7 @@ impl FontHandleMethods for FontHandle {
let mut face: FT_Face = ptr::null();
let face_index = 0 as FT_Long;
let result = FT_New_Memory_Face(lib, cbuf, cbuflen as FT_Long,
face_index, ptr::to_mut_unsafe_ptr(&mut face));
face_index, &mut face);

if !result.succeeded() || face.is_null() {
return Err(());
Expand Down Expand Up @@ -286,7 +286,7 @@ impl<'a> FontHandle {
let face_index = 0 as FT_Long;
file.to_c_str().with_ref(|file_str| {
FT_New_Face(ft_ctx, file_str,
face_index, ptr::to_mut_unsafe_ptr(&mut face));
face_index, &mut face);
});
if face.is_null() {
return Err(());
Expand All @@ -313,7 +313,7 @@ impl<'a> FontHandle {
let face_index = 0 as FT_Long;
file.to_c_str().with_ref(|file_str| {
FT_New_Face(ft_ctx, file_str,
face_index, ptr::to_mut_unsafe_ptr(&mut face));
face_index, &mut face);
});
if face.is_null() {
return Err(());
Expand Down
2 changes: 1 addition & 1 deletion src/components/gfx/platform/android/font_context.rs
Expand Up @@ -14,7 +14,7 @@ use std::ptr;
use std::rc::Rc;

#[deriving(Clone)]
struct FreeTypeLibraryHandle {
pub struct FreeTypeLibraryHandle {
ctx: FT_Library,
}

Expand Down
4 changes: 2 additions & 2 deletions src/components/gfx/platform/android/font_list.rs
Expand Up @@ -25,7 +25,7 @@ use font_list::{FontEntry, FontFamily, FontFamilyMap};
use platform::font::FontHandle;
use platform::font_context::FontContextHandle;

use std::hashmap::HashMap;
use collections::hashmap::HashMap;
use std::libc;
use std::libc::{c_int, c_char};
use std::ptr;
Expand Down Expand Up @@ -68,7 +68,7 @@ impl FontListHandle {
unsafe {
let config = FcConfigGetCurrent();
let font_set = FcConfigGetFonts(config, FcSetSystem);
let font_set_array_ptr = ptr::to_unsafe_ptr(&font_set);
let font_set_array_ptr = &font_set;
let pattern = FcPatternCreate();
assert!(pattern.is_not_null());
"family".to_c_str().with_ref(|FC_FAMILY| {
Expand Down
6 changes: 3 additions & 3 deletions src/components/main/platform/common/glut_windowing.rs
Expand Up @@ -132,7 +132,7 @@ impl WindowMethods<Application> for Window {
}
glut::mouse_func(~MouseCallbackState);

let wrapped_window = Rc::from_send(window);
let wrapped_window = Rc::new(window);

install_local_window(wrapped_window.clone());

Expand All @@ -151,11 +151,11 @@ impl WindowMethods<Application> for Window {

fn recv(&self) -> WindowEvent {
if !self.event_queue.with_mut(|queue| queue.is_empty()) {
return self.event_queue.with_mut(|queue| queue.shift())
return self.event_queue.with_mut(|queue| queue.shift().unwrap())
}
glut::check_loop();
if !self.event_queue.with_mut(|queue| queue.is_empty()) {
self.event_queue.with_mut(|queue| queue.shift())
self.event_queue.with_mut(|queue| queue.shift().unwrap())
} else {
IdleWindowEvent
}
Expand Down
2 changes: 1 addition & 1 deletion src/support/egl/rust-egl
2 changes: 1 addition & 1 deletion src/support/glut/rust-glut
2 changes: 1 addition & 1 deletion src/support/layers/rust-layers

0 comments on commit 6365b76

Please sign in to comment.