# add Builder.dupePkg\(\) · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/e821a57683e5cc69655e8aa2c2fa38b834b31c26)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: e821a57683e5cc69655e8aa2c2fa38b834b31c26

Requested commit: e821a57683e5cc69655e8aa2c2fa38b834b31c26

Commit: e821a57683e5cc69655e8aa2c2fa38b834b31c26

Tree: 597490d87885918ed8e44034a7777075ddc2cd19

Author: Jesse Rudolph

Committer: Andrew Kelley

## Message

```
add Builder.dupePkg()

mimics the duplication of strings in `Builder` for `Pkg`. This
ensures the lifetime of the memory backing strings in a `Pkg`
struct and the `Pkg.dependencies` slice is not shorter than the
`Builder` that the data is associated with.

```

## Parents

- [b0684bf084dbb5fe9ad7fb75dacf24cbd0a17231](https://git.cafe/gitcafe/zig/commit/b0684bf084dbb5fe9ad7fb75dacf24cbd0a17231?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/e821a57683e5cc69655e8aa2c2fa38b834b31c26?format=markdown)
