From 855ed79fc2a9a491afad5b46e6e2c4df8f8f9f3d Mon Sep 17 00:00:00 2001 From: Douman Date: Fri, 23 Apr 2021 15:46:08 +0900 Subject: [PATCH] Upgrade to bindgen 0.58 with some SJW renaming Retard issue https://github.com/rust-lang/rust-bindgen/issues/1997 --- Cargo.toml | 2 +- build.rs | 6 +++--- src/lib.rs | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 418b64c..5e9d4dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ default-features = false cmake = "0.1" [build-dependencies.bindgen] -version = "0.57" +version = "0.58" optional = true [features] diff --git a/build.rs b/build.rs index b1a5024..8f4d4ba 100644 --- a/build.rs +++ b/build.rs @@ -33,9 +33,9 @@ fn generate_lib() { .generate_comments(false) .layout_tests(false) .ctypes_prefix("libc") - .whitelist_type("[oO]pus.+") - .whitelist_function("[oO]pus.+") - .whitelist_var("[oO].+") + .allowlist_type("[oO]pus.+") + .allowlist_function("[oO]pus.+") + .allowlist_var("[oO].+") .use_core() .generate() .expect("Unable to generate bindings"); diff --git a/src/lib.rs b/src/lib.rs index 1255d04..b397e7b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,10 +1,12 @@ -/* automatically generated by rust-bindgen 0.57.0 */ +/* automatically generated by rust-bindgen 0.58.1 */ + #![no_std] #![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] + pub const OPUS_OK: libc::c_int = 0; pub const OPUS_BAD_ARG: libc::c_int = -1; pub const OPUS_BUFFER_TOO_SMALL: libc::c_int = -2;