From e673c082b3c8b113b03e5808e5c8112c847b90e7 Mon Sep 17 00:00:00 2001 From: Andrey Lesnikov Date: Fri, 21 Nov 2014 18:34:18 +0400 Subject: [PATCH] android: Updated for rust e583c4d24 2014-11-21 09:01:50 +0000 --- glue/src/lib.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/glue/src/lib.rs b/glue/src/lib.rs index ee62a46..74f3dbe 100644 --- a/glue/src/lib.rs +++ b/glue/src/lib.rs @@ -7,7 +7,6 @@ extern crate compile_msg; extern crate libc; -extern crate native; use std::sync::Mutex; @@ -62,7 +61,6 @@ macro_rules! android_start( /// This is the function that must be called by `android_main` #[doc(hidden)] pub fn android_main2(app: *mut (), main_function: proc(): Send) { - use native::NativeTaskBuilder; use std::task::TaskBuilder; use std::{mem, ptr}; @@ -72,7 +70,7 @@ pub fn android_main2(app: *mut (), main_function: proc(): Send) { let app: &mut ffi::android_app = unsafe { std::mem::transmute(app) }; // starting the runtime - native::start(1, &b"".as_ptr(), proc() { + std::rt::start(1, &b"".as_ptr(), proc() { // creating the context that will be passed to the callback let context = Context { senders: Mutex::new(Vec::new()) }; app.onAppCmd = commands_callback; @@ -80,7 +78,7 @@ pub fn android_main2(app: *mut (), main_function: proc(): Send) { app.userData = unsafe { std::mem::transmute(&context) }; // executing the main function in parallel - TaskBuilder::new().native().spawn(proc() { + spawn(proc() { std::io::stdio::set_stdout(box std::io::LineBufferedWriter::new(ToLogWriter)); std::io::stdio::set_stderr(box std::io::LineBufferedWriter::new(ToLogWriter)); main_function()