mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:47:45 +00:00
LibWeb: Make generated wrapper code cast IDL longs to i32 for now
This makes it possible to use "long" and "unsigned long" in IDL.
This commit is contained in:
parent
483b45db3f
commit
79bc07e5af
1 changed files with 2 additions and 2 deletions
|
@ -1271,11 +1271,11 @@ static @fully_qualified_name@* impl_from(JS::VM& vm, JS::GlobalObject& global_ob
|
|||
|
||||
return new_array;
|
||||
)~~~");
|
||||
} else if (return_type.name == "boolean" || return_type.name == "double" || return_type.name == "long" || return_type.name == "unsigned long") {
|
||||
} else if (return_type.name == "boolean" || return_type.name == "double") {
|
||||
scoped_generator.append(R"~~~(
|
||||
return JS::Value(retval);
|
||||
)~~~");
|
||||
} else if (return_type.name == "short" || return_type.name == "unsigned short") {
|
||||
} else if (return_type.name == "short" || return_type.name == "unsigned short" || return_type.name == "long" || return_type.name == "unsigned long") {
|
||||
scoped_generator.append(R"~~~(
|
||||
return JS::Value((i32)retval);
|
||||
)~~~");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue