# Make translate-c more robust in handling macro functions\. · gitcafe/zig

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

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

Visibility: public

Requested revision: fb1d4990cb60e805236122256da99d80c50ee0d4

Requested commit: fb1d4990cb60e805236122256da99d80c50ee0d4

Commit: fb1d4990cb60e805236122256da99d80c50ee0d4

Tree: a88b0bf565d8b6ac27598eda4eca1a46c5582e39

Author: Matthew Roush

Committer: GitHub

## Message

```
Make translate-c more robust in handling macro functions.

Translate-c didn't properly account for C macro functions having parameter names that are C keywords. So something like `#define FOO(float) ((float) + 10)` would've been interpreted as casting `+10` to a `float` type, instead of adding `10` to the parameter `float`.

An example of a real-world macro function like this is SDL3's `SDL_DEFINE_AUDIO_FORMAT` from `SDL_audio.h`, which uses `signed` as a parameter.
```

## Parents

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

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