diff options
author | bors-servo <metajack+bors@gmail.com> | 2014-12-18 04:42:50 -0700 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2014-12-18 04:42:50 -0700 |
commit | eea49ee1d986c306a8eec32b64be9b10cb2278fc (patch) | |
tree | 5c9555bd62fbb7375fab1561cb62660ea1022b7d /components/script/dom/bindings/codegen | |
parent | d7b3900431598883212162460254c846bf5f8b52 (diff) | |
parent | bf4480bb791cd918a00fb4bdea234fde676b28e0 (diff) | |
download | servo-eea49ee1d986c306a8eec32b64be9b10cb2278fc.tar.gz servo-eea49ee1d986c306a8eec32b64be9b10cb2278fc.zip |
auto merge of #4420 : servo/servo/fix-warnings, r=Ms2ger
Diffstat (limited to 'components/script/dom/bindings/codegen')
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index 4a760225cf4..b34c6441b70 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -104,8 +104,8 @@ class CastableObjectUnwrapper(): self.substitution = { "type": descriptor.nativeType, "depth": descriptor.interface.inheritanceDepth(), - "prototype": "PrototypeList::id::" + descriptor.name, - "protoID": "PrototypeList::id::" + descriptor.name + " as uint", + "prototype": "PrototypeList::ID::" + descriptor.name, + "protoID": "PrototypeList::ID::" + descriptor.name + " as uint", "source": source, "codeOnFailure": CGIndenter(CGGeneric(codeOnFailure), 4).define(), } @@ -1418,12 +1418,12 @@ class CGNamespace(CGWrapper): return CGNamespace(namespaces[0], inner, public=public) def DOMClass(descriptor): - protoList = ['PrototypeList::id::' + proto for proto in descriptor.prototypeChain] - # Pad out the list to the right length with id::Count so we + protoList = ['PrototypeList::ID::' + proto for proto in descriptor.prototypeChain] + # Pad out the list to the right length with ID::Count so we # guarantee that all the lists are the same length. id::Count # is never the ID of any prototype, so it's safe to use as # padding. - protoList.extend(['PrototypeList::id::Count'] * (descriptor.config.maxProtoChainLength - len(protoList))) + protoList.extend(['PrototypeList::ID::Count'] * (descriptor.config.maxProtoChainLength - len(protoList))) prototypeChainString = ', '.join(protoList) return """DOMClass { interface_chain: [ %s ], @@ -1801,7 +1801,7 @@ def CreateBindingJSObject(descriptor, parent=None): if descriptor.proxy: assert not descriptor.isGlobal() create += """ -let handler = RegisterBindings::proxy_handlers[PrototypeList::proxies::%s as uint]; +let handler = RegisterBindings::proxy_handlers[PrototypeList::Proxies::%s as uint]; let mut private = PrivateValue(squirrel_away_unique(aObject) as *const libc::c_void); let obj = with_compartment(aCx, proto, || { NewProxyObject(aCx, handler, @@ -1887,8 +1887,8 @@ class CGIDLInterface(CGThing): } return string.Template(""" impl IDLInterface for ${type} { - fn get_prototype_id(_: Option<${type}>) -> PrototypeList::id { - PrototypeList::id::${type} + fn get_prototype_id(_: Option<${type}>) -> PrototypeList::ID { + PrototypeList::ID::${type} } fn get_prototype_depth(_: Option<${type}>) -> uint { ${depth} @@ -2023,7 +2023,7 @@ class CGGetPerInterfaceObject(CGAbstractMethod): Argument('*mut JSObject', 'aReceiver')] CGAbstractMethod.__init__(self, descriptor, name, '*mut JSObject', args, pub=pub) - self.id = idPrefix + "id::" + self.descriptor.name + self.id = idPrefix + "ID::" + self.descriptor.name def definition_body(self): return CGGeneric(""" @@ -2682,7 +2682,7 @@ class CGMemberJITInfo(CGThing): self.descriptor = descriptor def defineJitInfo(self, infoName, opName, infallible): - protoID = "PrototypeList::id::%s as u32" % self.descriptor.name + protoID = "PrototypeList::ID::%s as u32" % self.descriptor.name depth = self.descriptor.interface.inheritanceDepth() failstr = "true" if infallible else "false" return ("\n" @@ -4397,7 +4397,7 @@ class CGRegisterProxyHandlersMethod(CGAbstractMethod): def definition_body(self): return CGList([ - CGGeneric("proxy_handlers[proxies::%s as uint] = codegen::Bindings::%sBinding::DefineProxyHandler();" % (desc.name, desc.name)) + CGGeneric("proxy_handlers[Proxies::%s as uint] = codegen::Bindings::%sBinding::DefineProxyHandler();" % (desc.name, desc.name)) for desc in self.descriptors ], "\n") @@ -5135,8 +5135,8 @@ class GlobalGenRoots(): return CGList([ CGGeneric(AUTOGENERATED_WARNING_COMMENT), CGGeneric("pub const MAX_PROTO_CHAIN_LENGTH: uint = %d;\n\n" % config.maxProtoChainLength), - CGNonNamespacedEnum('id', protos, [0], deriving="PartialEq"), - CGNonNamespacedEnum('proxies', proxies, [0], deriving="PartialEq"), + CGNonNamespacedEnum('ID', protos, [0], deriving="PartialEq"), + CGNonNamespacedEnum('Proxies', proxies, [0], deriving="PartialEq"), ]) @@ -5150,7 +5150,7 @@ class GlobalGenRoots(): return CGImports(code, [], [ 'dom::bindings::codegen', - 'dom::bindings::codegen::PrototypeList::proxies', + 'dom::bindings::codegen::PrototypeList::Proxies', 'js::jsapi::JSContext', 'js::jsapi::JSObject', 'libc', |