# make file and fn_name fields of SourceLocation also null-terminated · gitcafe/zig

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

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

Visibility: public

Requested revision: 4a387996311a025a021409f08a61bab9e9885987

Requested commit: 4a387996311a025a021409f08a61bab9e9885987

Commit: 4a387996311a025a021409f08a61bab9e9885987

Tree: ea36d6f87fc409b0eebc8f6149f248109b87735d

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
make file and fn_name fields of SourceLocation also null-terminated

One of the main motivating use cases for this language feature is
tracing/profiling tools, which expect null-terminated strings for these
values. Since the data is statically allocated, making them
additionally null-terminated comes at no cost.

This prevents the requirement of compile-time code to convert to
null-termination, which could increase the compilation time of
code with tracing enabled.

See #2029

```

## Parents

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

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