mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 12:51:54 +00:00
Implement Blob.stream()
This commit is contained in:
@@ -2375,7 +2375,7 @@ pub const FFI = struct {
|
||||
return JSC.toInvalidArguments("ptr to invalid memory, that would segfault Bun :(", .{}, globalThis.ref());
|
||||
}
|
||||
|
||||
return JSC.JSValue.jsNumber(@bitCast(f64, @as(usize, addr)));
|
||||
return JSC.JSValue.fromPtrAddress(addr);
|
||||
}
|
||||
|
||||
const ValueOrError = union(enum) {
|
||||
|
||||
@@ -351,7 +351,7 @@ pub const FFI = struct {
|
||||
return ZigString.init("Failed to compile (nothing happend!)").toErrorInstance(global);
|
||||
},
|
||||
.compiled => |compiled| {
|
||||
var cb = Bun__CreateFFIFunction(
|
||||
var cb = JSC.NewFunctionPtr(
|
||||
global,
|
||||
&ZigString.init(std.mem.span(function_name)),
|
||||
@intCast(u32, function.arg_types.items.len),
|
||||
@@ -443,7 +443,7 @@ pub const FFI = struct {
|
||||
return ZigString.init("Failed to compile (nothing happend!)").toErrorInstance(global);
|
||||
},
|
||||
.compiled => |compiled| {
|
||||
var cb = Bun__CreateFFIFunction(
|
||||
var cb = JSC.NewFunctionPtr(
|
||||
global,
|
||||
&ZigString.init(std.mem.span(function_name)),
|
||||
@intCast(u32, function.arg_types.items.len),
|
||||
@@ -1434,10 +1434,3 @@ pub const FFI = struct {
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
extern fn Bun__CreateFFIFunction(
|
||||
globalObject: *JSGlobalObject,
|
||||
symbolName: *const ZigString,
|
||||
argCount: u32,
|
||||
functionPointer: *anyopaque,
|
||||
) *anyopaque;
|
||||
|
||||
Reference in New Issue
Block a user