summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poveda Ruiz <31802960+pvdrz@users.noreply.github.com>2022-11-28 14:01:25 -0500
committerGitHub <noreply@github.com>2022-11-28 14:01:25 -0500
commita9d41985313f2f4e35a15fe1a94724fb373d051c (patch)
tree887a8f73b6a3bd88ea516c0b10abd5a3e0885699
parent199dfcc8e598ba834f7a7210a6ce004e99499d4f (diff)
Document callback changes and avoid static lifetime (#2366)
-rw-r--r--CHANGELOG.md2
-rw-r--r--bindgen/callbacks.rs5
2 files changed, 6 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c7519b62..ff6d35ff 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -156,6 +156,8 @@
## Changed
* Fixed name collisions when having a C `enum` and a `typedef` with the same
name.
+ * The `ParseCallbacks::generated_name_override` now receives `ItemInfo<'_>` as
+ argument instead of a `&str`.
## Removed
diff --git a/bindgen/callbacks.rs b/bindgen/callbacks.rs
index 1e48a302..cba406cb 100644
--- a/bindgen/callbacks.rs
+++ b/bindgen/callbacks.rs
@@ -32,7 +32,10 @@ pub trait ParseCallbacks: fmt::Debug {
/// This function will run for every extern variable and function. The returned value determines
/// the name visible in the bindings.
- fn generated_name_override(&self, _item_info: ItemInfo) -> Option<String> {
+ fn generated_name_override(
+ &self,
+ _item_info: ItemInfo<'_>,
+ ) -> Option<String> {
None
}