aboutsummaryrefslogtreecommitdiff
path: root/lib/std/builtin.zig
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2020-01-09 10:36:51 +0100
committerAndrew Kelley <andrew@ziglang.org>2020-01-09 13:43:06 -0500
commit5ab5de89c03bf9b3f08dfaa78d3b0fe41a72cdea (patch)
treec93dcfb6b6dad6d52d8d03e1d1a4601da5f04a3c /lib/std/builtin.zig
parent4613e4d15f85406d23f91134a9ec5854da33965f (diff)
downloadzig-5ab5de89c03bf9b3f08dfaa78d3b0fe41a72cdea.tar.gz
zig-5ab5de89c03bf9b3f08dfaa78d3b0fe41a72cdea.zip
New @export() handling
Use a struct as second parameter to be future proof (and also allows to specify default values for the parameters) Closes #2679 as it was just a matter of a few lines of code.
Diffstat (limited to 'lib/std/builtin.zig')
-rw-r--r--lib/std/builtin.zig8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/std/builtin.zig b/lib/std/builtin.zig
index 56414ee1b0..dbd19fbadf 100644
--- a/lib/std/builtin.zig
+++ b/lib/std/builtin.zig
@@ -419,6 +419,14 @@ pub const CallOptions = struct {
};
};
+/// This data structure is used by the Zig language code generation and
+/// therefore must be kept in sync with the compiler implementation.
+pub const ExportOptions = struct {
+ name: []const u8,
+ linkage: GlobalLinkage = .Strong,
+ section: ?[]const u8 = null,
+};
+
/// This function type is used by the Zig language code generation and
/// therefore must be kept in sync with the compiler implementation.
pub const TestFn = struct {