u16 isn't big enough

This commit is contained in:
Jarred Sumner
2021-09-27 16:28:04 -07:00
parent 3b92a867e2
commit 0da19a25cf
2 changed files with 10 additions and 6 deletions

View File

@@ -1443,10 +1443,14 @@ pub const JSValue = enum(i64) {
});
}
pub inline fn toU16(this: JSValue) u36 {
pub inline fn toU16(this: JSValue) u16 {
return @intCast(u16, this.toInt32());
}
pub inline fn toU32(this: JSValue) u32 {
return @intCast(u32, this.toInt32());
}
pub fn getLengthOfArray(this: JSValue, globalThis: *JSGlobalObject) u32 {
return cppFn("getLengthOfArray", .{
this,