File tree Expand file tree Collapse file tree 5 files changed +108
-107
lines changed Expand file tree Collapse file tree 5 files changed +108
-107
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
3
bindgen /usr/include/alpm.h \
4
- --whitelist -type ' (alpm|ALPM).*' \
5
- --whitelist -function ' (alpm|ALPM).*' \
4
+ --allowlist -type ' (alpm|ALPM).*' \
5
+ --allowlist -function ' (alpm|ALPM).*' \
6
6
--rustified-enum ' _alpm_[a-z_]+_t' \
7
7
--rustified-enum ' alpm_download_event_type_t' \
8
8
--constified-enum-module ' _alpm_siglevel_t' \
@@ -17,4 +17,4 @@ bindgen /usr/include/alpm.h \
17
17
--opaque-type alpm_db_t \
18
18
--opaque-type alpm_pkg_t \
19
19
--opaque-type alpm_trans_t \
20
- --size_t-is-usize \
20
+ " $@ "
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ fn main() {
19
19
}
20
20
21
21
#[ allow( dead_code) ]
22
- let lib = pkg_config:: Config :: new ( )
22
+ let _lib = pkg_config:: Config :: new ( )
23
23
. atleast_version ( "13.0.0" )
24
24
. statik ( cfg ! ( feature = "static" ) )
25
25
. probe ( "libalpm" )
@@ -30,13 +30,13 @@ fn main() {
30
30
let out_dir = env:: var_os ( "OUT_DIR" ) . unwrap ( ) ;
31
31
let dest_path = Path :: new ( & out_dir) . join ( "ffi_generated.rs" ) ;
32
32
33
- let header = lib
33
+ let header = _lib
34
34
. include_paths
35
35
. iter ( )
36
36
. map ( |i| i. join ( "alpm.h" ) )
37
37
. find ( |i| i. exists ( ) )
38
38
. expect ( "could not find alpm.h" ) ;
39
- let mut include = lib
39
+ let mut include = _lib
40
40
. include_paths
41
41
. iter ( )
42
42
. map ( |i| format ! ( "-I{}" , i. display( ) . to_string( ) ) )
@@ -50,6 +50,7 @@ fn main() {
50
50
51
51
let bindings = bindgen:: builder ( )
52
52
. clang_args ( & include)
53
+ . array_pointers_in_arguments ( true )
53
54
. header ( header. display ( ) . to_string ( ) )
54
55
. allowlist_type ( "(alpm|ALPM).*" )
55
56
. allowlist_function ( "(alpm|ALPM).*" )
You can’t perform that action at this time.
0 commit comments