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

Rustup 20150109 #132

Merged
merged 3 commits into from Jan 28, 2015
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

impl Sync for various types that need to be statics.

  • Loading branch information
jdm committed Jan 22, 2015
commit 6cabb12f858f27d23fc3d2d9f0c334b80eb56573
@@ -42,6 +42,7 @@ pub struct ProxyTraps {
pub getPrototypeOf: Option<unsafe extern "C" fn(*mut JSContext, *mut JSObject, *mut *mut JSObject) -> bool>,
pub trace: Option<unsafe extern "C" fn(*mut JSTracer, *mut JSObject)>,
}
unsafe impl Sync for ProxyTraps {}

pub enum AutoIdVector {}

@@ -319,6 +319,7 @@ pub struct JSClass {
pub trace: JSTraceOp,
pub reserved: [*mut c_void; 40u],
}
unsafe impl Sync for JSClass {}
pub struct JSConstDoubleSpec {
pub dval: c_double,
pub name: *const c_char,
@@ -168,7 +168,7 @@ pub unsafe extern fn reportError(_cx: *mut JSContext, msg: *const c_char, report
error!("Error at {}:{}: {}\n", fname, lineno, msg);
}

pub fn with_compartment<R, F: Fn() -> R>(cx: *mut JSContext, object: *mut JSObject, cb: F) -> R {
pub fn with_compartment<R, F: FnMut() -> R>(cx: *mut JSContext, object: *mut JSObject, mut cb: F) -> R {
unsafe {
let call = JS_EnterCrossCompartmentCall(cx, object);
let result = cb();
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.