# translate-c: add support for \_\_cleanup\_\_ attribute · gitcafe/zig

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

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

Visibility: public

Requested revision: 1273bc277f7274683db5041d8b41d91903e3045e

Requested commit: 1273bc277f7274683db5041d8b41d91903e3045e

Commit: 1273bc277f7274683db5041d8b41d91903e3045e

Tree: 11735aca89cbdb87ad30410763271ecfee8d902c

Author: Evan Haas

Committer: Veikka Tuominen

## Message

```
translate-c: add support for __cleanup__ attribute

Use a `defer` statement to implement the C __cleanup__ attribute.

See https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html

```

## Parents

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

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