diff options
author | Elichai Turkel <elichai.turkel@gmail.com> | 2019-05-20 13:54:50 +0300 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2019-05-22 13:45:59 +0200 |
commit | 36c0157fedd100bafca61de890b0124c6b771931 (patch) | |
tree | 7dcad56f598221f339bd0739c0fdd52914a163c5 | |
parent | d4e67befd679a9579e487512ba5e9aa1b843a2bc (diff) |
Added array_pointers to the builder
-rw-r--r-- | src/lib.rs | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1310,6 +1310,12 @@ impl Builder { self.options.no_hash_types.insert(arg.into()); self } + + /// Set whether `arr[size]` should be treated as `*mut T` or `*mut [T; size]` (same for mut) + pub fn array_pointers_in_arguments(mut self, doit: bool) -> Self { + self.options.array_pointers_in_arguments = doit; + self + } } /// Configuration options for generated bindings. @@ -1544,6 +1550,9 @@ struct BindgenOptions { /// The set of types that we should not derive `Hash` for. no_hash_types: RegexSet, + + /// Decide if C arrays should be regular pointers in rust or array pointers + array_pointers_in_arguments: bool, } /// TODO(emilio): This is sort of a lie (see the error message that results from @@ -1656,6 +1665,7 @@ impl Default for BindgenOptions { no_partialeq_types: Default::default(), no_copy_types: Default::default(), no_hash_types: Default::default(), + array_pointers_in_arguments: false, } } } |