aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/utils.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-01-29 18:41:30 +0100
committerMs2ger <ms2ger@gmail.com>2015-01-29 18:41:30 +0100
commit23813577d1414f8466bc0d4fd5e83948403bd934 (patch)
tree348356ebad1e5b6aaaf0833a9a30005bba043c2d /components/script/dom/bindings/utils.rs
parentb4b59df5e4b04ea52858b1a5b3176e51d4f25501 (diff)
downloadservo-23813577d1414f8466bc0d4fd5e83948403bd934.tar.gz
servo-23813577d1414f8466bc0d4fd5e83948403bd934.zip
Use snake case for the members of NativeProperties.
Note that the codegen uses the names of the Python fields to initialize the Rust struct.
Diffstat (limited to 'components/script/dom/bindings/utils.rs')
-rw-r--r--components/script/dom/bindings/utils.rs16
1 files changed, 10 insertions, 6 deletions
diff --git a/components/script/dom/bindings/utils.rs b/components/script/dom/bindings/utils.rs
index 3bc80172b90..8e5610d97d3 100644
--- a/components/script/dom/bindings/utils.rs
+++ b/components/script/dom/bindings/utils.rs
@@ -171,9 +171,9 @@ pub struct NativeProperties {
/// Constants for the interface.
pub consts: Option<&'static [ConstantSpec]>,
/// Static methods for the interface.
- pub staticMethods: Option<&'static [JSFunctionSpec]>,
+ pub static_methods: Option<&'static [JSFunctionSpec]>,
/// Static attributes for the interface.
- pub staticAttrs: Option<&'static [JSPropertySpec]>,
+ pub static_attrs: Option<&'static [JSPropertySpec]>,
}
unsafe impl Sync for NativeProperties {}
@@ -226,13 +226,17 @@ fn CreateInterfaceObject(cx: *mut JSContext, global: *mut JSObject, receiver: *m
let constructor = JS_GetFunctionObject(fun);
assert!(!constructor.is_null());
- match members.staticMethods {
- Some(staticMethods) => DefineMethods(cx, constructor, staticMethods),
+ match members.static_methods {
+ Some(static_methods) => {
+ DefineMethods(cx, constructor, static_methods)
+ },
_ => (),
}
- match members.staticAttrs {
- Some(staticProperties) => DefineProperties(cx, constructor, staticProperties),
+ match members.static_attrs {
+ Some(static_properties) => {
+ DefineProperties(cx, constructor, static_properties)
+ },
_ => (),
}