Function dupe [src]
Prototype
pub fn dupe(file: RcSourceFile, b: *std.Build) RcSourceFile
Parameters
file: RcSourceFile
b: *std.Build
Source
pub fn dupe(file: RcSourceFile, b: *std.Build) RcSourceFile {
const include_paths = b.allocator.alloc(LazyPath, file.include_paths.len) catch @panic("OOM");
for (include_paths, file.include_paths) |*dest, lazy_path| dest.* = lazy_path.dupe(b);
return .{
.file = file.file.dupe(b),
.flags = b.dupeStrings(file.flags),
.include_paths = include_paths,
};
}