diff options
author | 2021-08-03 23:33:44 -0700 | |
---|---|---|
committer | 2021-08-03 23:33:44 -0700 | |
commit | d2d7e0814504df7688e13d43bd757d6c13f29342 (patch) | |
tree | 4aa28dad134981fff4955c916923ac44a5e2cd2a /build.zig | |
parent | 1aa81cd90dce7bc2236ea771a43e58d1c35ec682 (diff) | |
download | bun-d2d7e0814504df7688e13d43bd757d6c13f29342.tar.gz bun-d2d7e0814504df7688e13d43bd757d6c13f29342.tar.zst bun-d2d7e0814504df7688e13d43bd757d6c13f29342.zip |
Pass allocatorreplace
Former-commit-id: 91a465b58c9860ea601f6a5c1bf4b9238b914932
Diffstat (limited to 'build.zig')
-rw-r--r-- | build.zig | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -53,8 +53,16 @@ const HeadersMaker = struct { remainder = begin[end_struct..]; } - _ = std.mem.replace(u8, new_contents, "[*c][*c]JSC__Exception", "*?*JSC__Exception ", new_contents); - _ = std.mem.replace(u8, new_contents, "[*c]?*c_void", "[*c]*c_void", new_contents); + const HARDCODE = [_][]const u8{ + "[*c][*c]JSC__Exception", + "*?*JSC__Exception ", + "[*c]?*c_void", + "[*c]*c_void", + }; + i = 0; + while (i < HARDCODE.len) : (i += 2) { + _ = std.mem.replace(u8, new_contents, HARDCODE[i], HARDCODE[i + 1], new_contents); + } const js_value_start = std.mem.indexOf(u8, new_contents, "pub const JSC__JSValue") orelse unreachable; const js_value_end = std.mem.indexOf(u8, new_contents[js_value_start..], "\n") orelse unreachable; |