From 2c8f43dcf8cd9e9314b7c7a020be1dbb123c5108 Mon Sep 17 00:00:00 2001 From: Lars Bergstrom Date: Fri, 11 Apr 2014 19:06:12 -0500 Subject: [PATCH] Upgrade to rust --- azure.rc | 13 +++++++------ azure.rs | 4 ++-- azure_hl.rs | 6 +++--- scaled_font.rs | 2 +- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/azure.rc b/azure.rc index 49667aa..d134d87 100644 --- a/azure.rc +++ b/azure.rc @@ -2,13 +2,14 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#[crate_id = "github.com/mozilla-servo/rust-azure#azure:0.1"]; -#[crate_type = "lib"]; -#[crate_type = "dylib"]; -#[crate_type = "rlib"]; +#![crate_id = "github.com/mozilla-servo/rust-azure#azure:0.1"] +#![crate_type = "lib"] +#![crate_type = "dylib"] +#![crate_type = "rlib"] -#[feature(globs)]; +#![feature(globs)] +extern crate libc; extern crate std; extern crate sync; extern crate geom; @@ -19,7 +20,7 @@ extern crate xlib; #[cfg(target_os = "android")] extern crate egl; #[cfg(not(target_os = "android"))] -extern crate glfw = "glfw-rs"; +extern crate glfw; pub use azure::*; diff --git a/azure.rs b/azure.rs index 7b2b1bd..5a16475 100644 --- a/azure.rs +++ b/azure.rs @@ -4,9 +4,9 @@ /* automatically generated by rust-bindgen */ -#[allow(non_uppercase_statics, non_camel_case_types)]; +#![allow(non_uppercase_statics, non_camel_case_types)] -use std::libc::*; +use libc::*; pub type AzFontOptions = *c_void; pub type AzFloat = c_float; diff --git a/azure_hl.rs b/azure_hl.rs index 26dbbdd..cc5ca31 100644 --- a/azure_hl.rs +++ b/azure_hl.rs @@ -36,15 +36,15 @@ use geom::point::Point2D; use geom::rect::Rect; use geom::size::Size2D; use layers::platform::surface::{NativeGraphicsMetadata, NativePaintingGraphicsContext}; -use std::libc::types::common::c99::{uint8_t, uint16_t}; -use std::libc::size_t; +use libc::types::common::c99::{uint8_t, uint16_t}; +use libc::size_t; use std::cast; use std::ptr; use std::ptr::null; use std::slice; #[cfg(target_os="linux")] -use std::libc::c_void; +use libc::c_void; pub trait AsAzureRect { fn as_azure_rect(&self) -> AzRect; diff --git a/scaled_font.rs b/scaled_font.rs index 6f6617b..9279c46 100644 --- a/scaled_font.rs +++ b/scaled_font.rs @@ -8,8 +8,8 @@ use azure::{struct__AzNativeFont}; use azure_hl::{BackendType,SkiaBackend}; use azure::{AzCreateScaledFontForNativeFont, AzReleaseScaledFont}; +use libc::c_void; use std::cast; -use std::libc::c_void; use std::ptr; #[cfg(target_os="macos")]