feature. See also
. The project being documented here (as the example) is the Zig library itself.
Serialize.initIncludeDirList
fn initIncludeDirList(
s: *Serialize,
list: []const std.Build.Module.IncludeDir,
) ![]const Configuration.Module.IncludeDir
File
Code
fn initIncludeDirList(
s: *Serialize,
list: []const std.Build.Module.IncludeDir,
) ![]const Configuration.Module.IncludeDir {
const result = try s.arena.alloc(Configuration.Module.IncludeDir, list.len);
for (result, list) |*dest, src| dest.* = switch (src) {
.path => |lp| .{ .path = try addLazyPath(s, lp) },
.path_system => |lp| .{ .path_system = try addLazyPath(s, lp) },
.path_after => |lp| .{ .path_after = try addLazyPath(s, lp) },
.framework_path => |lp| .{ .framework_path = try addLazyPath(s, lp) },
.framework_path_system => |lp| .{ .framework_path_system = try addLazyPath(s, lp) },
.embed_path => |lp| .{ .embed_path = try addLazyPath(s, lp) },
.other_step => |cs| .{ .path = try addLazyPath(s, cs.installed_headers_include_tree.?.getDirectory()) },
.config_header_step => |chs| .{ .config_header_step = stepIndex(s, &chs.step) },
};
return result;
}