Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rename-all=prefix #1021

Merged
merged 3 commits into from
Oct 27, 2024
Merged

Add rename-all=prefix #1021

merged 3 commits into from
Oct 27, 2024

Conversation

emilio
Copy link
Collaborator

@emilio emilio commented Oct 27, 2024

This is #1007 but with nits and a test.

Closes #1007

jsgf and others added 3 commits October 27, 2024 23:12
This adds a new rename-all annotation which allows setting a specific
prefix to all fields. For example:

```rust
/// cbindgen:rename-all=prefix:ERR_
enum Error {
   Bad = 0,
   VeryBad = 1
}
```

While in principle this can be added to the config file, it's primarily
useful for overrides on a case-by-case basis.
@emilio emilio added this pull request to the merge queue Oct 27, 2024
Merged via the queue into master with commit 3e7db6d Oct 27, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants