Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the build warning-free. #244

Merged
merged 4 commits into from Mar 7, 2016
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -30,7 +30,7 @@
use JSPROP_ENUMERATE;
use error::throw_type_error;
use glue::RUST_JS_NumberValue;
use jsapi::{JSContext, JSObject, JSString, Handle, HandleValue, MutableHandleValue};
use jsapi::{JSContext, JSObject, JSString, HandleValue, MutableHandleValue};
use jsapi::{JS_NewUCStringCopyN, JS_StringHasLatin1Chars, JS_WrapValue};
use jsapi::{JS_GetLatin1StringCharsAndLength, JS_GetTwoByteStringCharsAndLength};
use jsapi::{JS_NewArrayObject1, JS_DefineElement, RootedValue, RootedObject};
@@ -402,7 +402,7 @@ pub unsafe fn latin1_to_string(cx: *mut JSContext, s: *mut JSString) -> String {
impl ToJSValConvertible for str {
unsafe fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandleValue) {
let mut string_utf16: Vec<u16> = Vec::with_capacity(self.len());
string_utf16.extend(self.utf16_units());
string_utf16.extend(self.encode_utf16());
let jsstr = JS_NewUCStringCopyN(cx,
string_utf16.as_ptr(),
string_utf16.len() as libc::size_t);
@@ -7,10 +7,10 @@

#![feature(core_intrinsics)]
#![feature(link_args)]
#![feature(str_utf16)]
#![feature(unsafe_no_drop_flag)]
#![feature(const_fn)]

#![allow(drop_with_repr_extern)]
#![allow(non_upper_case_globals, non_camel_case_types, non_snake_case, improper_ctypes)]

#[macro_use]
@@ -124,7 +124,7 @@ impl Runtime {

pub fn evaluate_script(&self, glob: HandleObject, script: String, filename: String, line_num: u32)
-> Result<(),()> {
let script_utf16: Vec<u16> = script.utf16_units().collect();
let script_utf16: Vec<u16> = script.encode_utf16().collect();
let filename_cstr = ffi::CString::new(filename.as_bytes()).unwrap();
debug!("Evaluating script from {} with content {}", filename, script);
// SpiderMonkey does not approve of null pointers.
@@ -171,7 +171,7 @@ impl Drop for Runtime {
// ___________________________________________________________________________
// Rooting API for standard JS things

trait RootKind {
pub trait RootKind {
fn rootKind() -> ThingRootKind;
}

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.