Pass isize to ptr.offset().

This commit is contained in:
Ms2ger 2015-02-20 14:42:32 +01:00
parent a3fedee46e
commit 9c863a6bd4

View file

@ -2071,11 +2071,11 @@ assert!(((*JS_GetClass(global)).flags & JSCLASS_DOM_GLOBAL) != 0);
/* Check to see whether the interface objects are already installed */
let proto_or_iface_array = get_proto_or_iface_array(global);
let cached_object: *mut JSObject = *proto_or_iface_array.offset(%s as int);
let cached_object: *mut JSObject = *proto_or_iface_array.offset(%s as isize);
if cached_object.is_null() {
let tmp: *mut JSObject = CreateInterfaceObjects(cx, global, receiver);
assert!(!tmp.is_null());
*proto_or_iface_array.offset(%s as int) = tmp;
*proto_or_iface_array.offset(%s as isize) = tmp;
tmp
} else {
cached_object