Skip to content

Commit c11cab1

Browse files
committed
Always use static valist when not generate
1 parent 144ced6 commit c11cab1

File tree

5 files changed

+108
-107
lines changed

5 files changed

+108
-107
lines changed

alpm-sys/bindgen

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/sh
22

33
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).*' \
66
--rustified-enum '_alpm_[a-z_]+_t' \
77
--rustified-enum 'alpm_download_event_type_t' \
88
--constified-enum-module '_alpm_siglevel_t' \
@@ -17,4 +17,4 @@ bindgen /usr/include/alpm.h \
1717
--opaque-type alpm_db_t \
1818
--opaque-type alpm_pkg_t \
1919
--opaque-type alpm_trans_t \
20-
--size_t-is-usize \
20+
"$@"

alpm-sys/build.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn main() {
1919
}
2020

2121
#[allow(dead_code)]
22-
let lib = pkg_config::Config::new()
22+
let _lib = pkg_config::Config::new()
2323
.atleast_version("13.0.0")
2424
.statik(cfg!(feature = "static"))
2525
.probe("libalpm")
@@ -30,13 +30,13 @@ fn main() {
3030
let out_dir = env::var_os("OUT_DIR").unwrap();
3131
let dest_path = Path::new(&out_dir).join("ffi_generated.rs");
3232

33-
let header = lib
33+
let header = _lib
3434
.include_paths
3535
.iter()
3636
.map(|i| i.join("alpm.h"))
3737
.find(|i| i.exists())
3838
.expect("could not find alpm.h");
39-
let mut include = lib
39+
let mut include = _lib
4040
.include_paths
4141
.iter()
4242
.map(|i| format!("-I{}", i.display().to_string()))
@@ -50,6 +50,7 @@ fn main() {
5050

5151
let bindings = bindgen::builder()
5252
.clang_args(&include)
53+
.array_pointers_in_arguments(true)
5354
.header(header.display().to_string())
5455
.allowlist_type("(alpm|ALPM).*")
5556
.allowlist_function("(alpm|ALPM).*")

0 commit comments

Comments
 (0)