aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/api
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-05-20 19:43:44 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-05-20 22:02:09 -0700
commit50bb4749af25efce64bc7e7b1045855f81b6343e (patch)
treef748b64298b380420526ed8bf36caea6296cc33e /src/bun.js/api
parentff4df6b6001ac7fd30103b469d0a076021f533c2 (diff)
downloadbun-50bb4749af25efce64bc7e7b1045855f81b6343e.tar.gz
bun-50bb4749af25efce64bc7e7b1045855f81b6343e.tar.zst
bun-50bb4749af25efce64bc7e7b1045855f81b6343e.zip
[internal] Make `JSC.NewFunction` more type safe
Diffstat (limited to 'src/bun.js/api')
-rw-r--r--src/bun.js/api/ffi.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bun.js/api/ffi.zig b/src/bun.js/api/ffi.zig
index ae3e596f1..fe2b50955 100644
--- a/src/bun.js/api/ffi.zig
+++ b/src/bun.js/api/ffi.zig
@@ -384,7 +384,7 @@ pub const FFI = struct {
global,
&str,
@intCast(u32, function.arg_types.items.len),
- compiled.ptr,
+ bun.cast(JSC.JSHostFunctionPtr, compiled.ptr),
false,
);
compiled.js_function = cb;
@@ -480,7 +480,7 @@ pub const FFI = struct {
global,
name,
@intCast(u32, function.arg_types.items.len),
- compiled.ptr,
+ bun.cast(JSC.JSHostFunctionPtr, compiled.ptr),
false,
);
compiled.js_function = cb;