diff options
Diffstat (limited to 'components/script/dom/bindings/codegen/CodegenRust.py')
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index d614e4de7b2..ebac6455b1f 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -1014,7 +1014,7 @@ class CGArgumentConverter(CGThing): seqType = CGTemplatedType("Vec", declType) variadicConversion = string.Template( - "let mut vector: ${seqType} = Vec::with_capacity((${argc} - ${index}) as uint);\n" + "let mut vector: ${seqType} = Vec::with_capacity((${argc} - ${index}) as usize);\n" "for variadicArg in range(${index}, ${argc}) {\n" "${inner}\n" " vector.push(slot);\n" @@ -1835,7 +1835,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 usize]; let mut private = PrivateValue(boxed::into_raw(object) as *const libc::c_void); let obj = with_compartment(cx, proto, || { NewProxyObject(cx, handler, @@ -2800,7 +2800,7 @@ class CGEnum(CGThing): CGThing.__init__(self) decl = """\ -#[repr(uint)] +#[repr(usize)] #[derive(PartialEq, Copy)] #[jstraceable] pub enum %s { @@ -2819,7 +2819,7 @@ pub const strings: &'static [&'static str] = &[ impl ToJSValConvertible for super::%s { fn to_jsval(&self, cx: *mut JSContext) -> JSVal { - strings[*self as uint].to_jsval(cx) + strings[*self as usize].to_jsval(cx) } } """ % (",\n ".join(['"%s"' % val for val in enum.values()]), enum.identifier.name) @@ -4496,7 +4496,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 usize] = codegen::Bindings::%sBinding::DefineProxyHandler();" % (desc.name, desc.name)) for desc in self.descriptors ], "\n") @@ -5225,7 +5225,7 @@ class GlobalGenRoots(): return CGList([ CGGeneric(AUTOGENERATED_WARNING_COMMENT), - CGGeneric("pub const MAX_PROTO_CHAIN_LENGTH: uint = %d;\n\n" % config.maxProtoChainLength), + CGGeneric("pub const MAX_PROTO_CHAIN_LENGTH: usize = %d;\n\n" % config.maxProtoChainLength), CGNonNamespacedEnum('ID', protos, [0], deriving="PartialEq, Copy"), CGNonNamespacedEnum('Proxies', proxies, [0], deriving="PartialEq, Copy"), ]) |