mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Use snake case for arguments and locals in CGCreateInterfaceObjectsMethod.
This commit is contained in:
parent
1056ea320b
commit
10ce1c8df5
1 changed files with 7 additions and 7 deletions
|
@ -1962,21 +1962,21 @@ class CGCreateInterfaceObjectsMethod(CGAbstractMethod):
|
||||||
"""
|
"""
|
||||||
def __init__(self, descriptor, properties):
|
def __init__(self, descriptor, properties):
|
||||||
assert not descriptor.interface.isCallback()
|
assert not descriptor.interface.isCallback()
|
||||||
args = [Argument('*mut JSContext', 'aCx'), Argument('*mut JSObject', 'aGlobal'),
|
args = [Argument('*mut JSContext', 'cx'), Argument('*mut JSObject', 'global'),
|
||||||
Argument('*mut JSObject', 'aReceiver')]
|
Argument('*mut JSObject', 'receiver')]
|
||||||
CGAbstractMethod.__init__(self, descriptor, 'CreateInterfaceObjects', '*mut JSObject', args)
|
CGAbstractMethod.__init__(self, descriptor, 'CreateInterfaceObjects', '*mut JSObject', args)
|
||||||
self.properties = properties
|
self.properties = properties
|
||||||
def definition_body(self):
|
def definition_body(self):
|
||||||
protoChain = self.descriptor.prototypeChain
|
protoChain = self.descriptor.prototypeChain
|
||||||
if len(protoChain) == 1:
|
if len(protoChain) == 1:
|
||||||
getParentProto = "JS_GetObjectPrototype(aCx, aGlobal)"
|
getParentProto = "JS_GetObjectPrototype(cx, global)"
|
||||||
else:
|
else:
|
||||||
parentProtoName = self.descriptor.prototypeChain[-2]
|
parentProtoName = self.descriptor.prototypeChain[-2]
|
||||||
getParentProto = ("%s::GetProtoObject(aCx, aGlobal, aReceiver)" %
|
getParentProto = ("%s::GetProtoObject(cx, global, receiver)" %
|
||||||
toBindingNamespace(parentProtoName))
|
toBindingNamespace(parentProtoName))
|
||||||
|
|
||||||
getParentProto = ("let parentProto: *mut JSObject = %s;\n"
|
getParentProto = ("let parent_proto: *mut JSObject = %s;\n"
|
||||||
"assert!(!parentProto.is_null());\n") % getParentProto
|
"assert!(!parent_proto.is_null());\n") % getParentProto
|
||||||
|
|
||||||
if self.descriptor.concrete:
|
if self.descriptor.concrete:
|
||||||
if self.descriptor.proxy:
|
if self.descriptor.proxy:
|
||||||
|
@ -2001,7 +2001,7 @@ class CGCreateInterfaceObjectsMethod(CGAbstractMethod):
|
||||||
constructor = 'None'
|
constructor = 'None'
|
||||||
|
|
||||||
call = """\
|
call = """\
|
||||||
return do_create_interface_objects(aCx, aGlobal, aReceiver, parentProto,
|
return do_create_interface_objects(cx, global, receiver, parent_proto,
|
||||||
&PrototypeClass, %s,
|
&PrototypeClass, %s,
|
||||||
%s,
|
%s,
|
||||||
&sNativeProperties);""" % (constructor, domClass)
|
&sNativeProperties);""" % (constructor, domClass)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue