servo / rust-mozjs

DEPRECATED - moved to servo/mozjs instead.
Mozilla Public License 2.0
293 stars 122 forks source link

Make ConstNullValue a static. #209

Closed Ms2ger closed 7 years ago

Ms2ger commented 8 years ago

consts don't have addresses.

Review on Reviewable

jdm commented 8 years ago
src/rust.rs:303:40: 303:58 error: the trait `core::marker::Sync` is not implemented for the type `*mut jsapi_linux_64::JSObject` [E0277]

src/rust.rs:303 static ConstNullValue: *mut JSObject = 0 as *mut JSObject;

                                                       ^~~~~~~~~~~~~~~~~~

src/rust.rs:303:40: 303:58 help: run `rustc --explain E0277` to see a detailed explanation

src/rust.rs:303:40: 303:58 note: `*mut jsapi_linux_64::JSObject` cannot be shared between threads safely

src/rust.rs:303:40: 303:58 note: shared static variables must have a type that implements `Sync`
nox commented 8 years ago

ptr::null_mut() is a const function.

jdm commented 7 years ago

Closing due to lack of activity.