mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Use snake case for arguments to and locals in create_interface_prototype_object.
This commit is contained in:
parent
23743e3c20
commit
4d1cbae611
1 changed files with 9 additions and 8 deletions
|
@ -300,30 +300,31 @@ fn define_properties(cx: *mut JSContext, obj: *mut JSObject,
|
||||||
/// Creates the *interface prototype object*.
|
/// Creates the *interface prototype object*.
|
||||||
/// Fails on JSAPI failure.
|
/// Fails on JSAPI failure.
|
||||||
fn create_interface_prototype_object(cx: *mut JSContext, global: *mut JSObject,
|
fn create_interface_prototype_object(cx: *mut JSContext, global: *mut JSObject,
|
||||||
parentProto: *mut JSObject,
|
parent_proto: *mut JSObject,
|
||||||
protoClass: &'static JSClass,
|
proto_class: &'static JSClass,
|
||||||
members: &'static NativeProperties)
|
members: &'static NativeProperties)
|
||||||
-> *mut JSObject {
|
-> *mut JSObject {
|
||||||
unsafe {
|
unsafe {
|
||||||
let ourProto = JS_NewObjectWithUniqueType(cx, protoClass, &*parentProto, &*global);
|
let our_proto = JS_NewObjectWithUniqueType(cx, proto_class,
|
||||||
assert!(!ourProto.is_null());
|
&*parent_proto, &*global);
|
||||||
|
assert!(!our_proto.is_null());
|
||||||
|
|
||||||
match members.methods {
|
match members.methods {
|
||||||
Some(methods) => define_methods(cx, ourProto, methods),
|
Some(methods) => define_methods(cx, our_proto, methods),
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
|
|
||||||
match members.attrs {
|
match members.attrs {
|
||||||
Some(properties) => define_properties(cx, ourProto, properties),
|
Some(properties) => define_properties(cx, our_proto, properties),
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
|
|
||||||
match members.consts {
|
match members.consts {
|
||||||
Some(constants) => define_constants(cx, ourProto, constants),
|
Some(constants) => define_constants(cx, our_proto, constants),
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
|
|
||||||
return ourProto;
|
return our_proto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue