# Change defineCMacro to take separate name and value arugments · gitcafe/zig

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

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

Visibility: public

Requested revision: 6cc88458029759bbedcb4d949deb887d464cdd60

Requested commit: 6cc88458029759bbedcb4d949deb887d464cdd60

Commit: 6cc88458029759bbedcb4d949deb887d464cdd60

Tree: 1e31fcbe7cd4a2cbb2d1d652d6358825554ad1f0

Author: Asa Zeren

Committer: Veikka Tuominen

## Message

```
Change defineCMacro to take separate name and value arugments

Before this change, when one or more of name or value are not known at
comptime, build.zig files must allocate and do the concatanation, which can be
cumbersome, and also adds a redundant allocation when name and value are
slices. The new version only does a single allocation directly in the builder's
allocator to concatonate name and value.

The origional behavior is available in defineCMacroRaw, for use in situations
such as parseing c compiler arguments.

Additionally, several places have been updated to use the new funtions.

```

## Parents

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

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