stage2: implement cImport

This commit is contained in:
Veikka Tuominen
2021-09-19 11:51:32 +03:00
committed by Andrew Kelley
parent 1ad905c71e
commit 9a54ff72df
4 changed files with 92 additions and 7 deletions

View File

@@ -1325,6 +1325,8 @@ pub const Scope = struct {
/// when null, it is determined by build mode, changed by @setRuntimeSafety
want_safety: ?bool = null,
c_import_buf: ?*std.ArrayList(u8) = null,
const Param = struct {
/// `noreturn` means `anytype`.
ty: Type,
@@ -1377,6 +1379,7 @@ pub const Scope = struct {
.runtime_loop = parent.runtime_loop,
.runtime_index = parent.runtime_index,
.want_safety = parent.want_safety,
.c_import_buf = parent.c_import_buf,
};
}