mirror of
https://github.com/Sarsoo/csbindgen.git
synced 2024-12-22 22:46:26 +00:00
Merge pull request #49 from Skgland/patch-1
fix braking change of Cysharp/csbindgen#48
This commit is contained in:
commit
5524c91958
@ -185,6 +185,13 @@ impl Builder {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// configure C# generate const, default is false
|
||||||
|
/// equivalent to csharp_generate_const_filter(|_| csharp_generate_const)
|
||||||
|
#[deprecated(note = "User csharp_generate_const_filter instead")]
|
||||||
|
pub fn csharp_generate_const(mut self, csharp_generate_const: bool) -> Builder {
|
||||||
|
self.csharp_generate_const_filter(if csharp_generate_const { |_| true } else { |_| false })
|
||||||
|
}
|
||||||
|
|
||||||
/// configure C# generate const filter, default `|_| false`
|
/// configure C# generate const filter, default `|_| false`
|
||||||
pub fn csharp_generate_const_filter(mut self, csharp_generate_const_filter: fn(const_name: &str) -> bool) -> Builder {
|
pub fn csharp_generate_const_filter(mut self, csharp_generate_const_filter: fn(const_name: &str) -> bool) -> Builder {
|
||||||
self.options.csharp_generate_const_filter = csharp_generate_const_filter;
|
self.options.csharp_generate_const_filter = csharp_generate_const_filter;
|
||||||
|
Loading…
Reference in New Issue
Block a user