diff options
author | 2023-01-01 02:17:53 -0800 | |
---|---|---|
committer | 2023-01-01 02:19:11 -0800 | |
commit | 9e6d39bae6e02d437a73684a574da358d1e743ee (patch) | |
tree | 9047150ce5ad18d7e13eed4b127b3f121d99f12a /src/c.zig | |
parent | f651f74f9d2ddb578aa2aa98f0146f17da087c23 (diff) | |
download | bun-9e6d39bae6e02d437a73684a574da358d1e743ee.tar.gz bun-9e6d39bae6e02d437a73684a574da358d1e743ee.tar.zst bun-9e6d39bae6e02d437a73684a574da358d1e743ee.zip |
[internal] Add more bindings
Diffstat (limited to '')
-rw-r--r-- | src/c.zig | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -392,9 +392,10 @@ const LazyStatus = enum { loaded, failed, }; -pub fn dlsym(comptime Type: type, comptime name: [:0]const u8) ?Type { + +pub fn dlsym(comptime Type: type, comptime name: [:0]const u8) ?*const Type { const Wrapper = struct { - pub var function: Type = undefined; + pub var function: *const Type = undefined; pub var loaded: LazyStatus = LazyStatus.pending; }; @@ -406,7 +407,7 @@ pub fn dlsym(comptime Type: type, comptime name: [:0]const u8) ?Type { const result = std.c.dlsym(RTLD_DEFAULT, name); if (result) |ptr| { - Wrapper.function = bun.cast(Type, ptr); + Wrapper.function = bun.cast(*const Type, ptr); Wrapper.loaded = .loaded; return Wrapper.function; } else { |