From 5ab5de89c03bf9b3f08dfaa78d3b0fe41a72cdea Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Thu, 9 Jan 2020 10:36:51 +0100 Subject: 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. --- lib/std/builtin.zig | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/std/builtin.zig') 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 { -- cgit v1.2.3