Skip to content

Commit e3b0def

Browse files
authored
build(rust): Upgrade bindgen to 0.72.1 for Fedora packaging
2 parents 2065c55 + d097ec8 commit e3b0def

File tree

3 files changed

+27
-5
lines changed

3 files changed

+27
-5
lines changed

src/rust/Cargo.lock

Lines changed: 21 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ rsmpeg = { git = "https://github.com/CCExtractor/rsmpeg.git", default-features =
3939
rsmpeg = { git = "https://github.com/CCExtractor/rsmpeg.git", default-features = false, features = ["ffmpeg7", "link_system_ffmpeg"], optional = true }
4040

4141
[build-dependencies]
42-
bindgen = "0.64.0"
42+
bindgen = "0.72.1"
4343
pkg-config = "0.3.32"
4444

4545
[dev-dependencies]

src/rust/build.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ use std::path::PathBuf;
55
fn main() {
66
let mut allowlist_functions = Vec::new();
77
allowlist_functions.extend_from_slice(&[
8-
".*(?i)_?dtvcc_.*",
8+
// Match both lowercase (dtvcc_*) and uppercase (DTVCC_*) patterns
9+
".*_?[Dd][Tt][Vv][Cc][Cc]_.*",
910
"get_visible_.*",
1011
"get_fts",
1112
"printdata",
@@ -44,7 +45,8 @@ fn main() {
4445

4546
let mut allowlist_types = Vec::new();
4647
allowlist_types.extend_from_slice(&[
47-
".*(?i)_?dtvcc_.*",
48+
// Match both lowercase (dtvcc_*) and uppercase (DTVCC_*) patterns
49+
".*_?[Dd][Tt][Vv][Cc][Cc]_.*",
4850
"encoder_ctx",
4951
"lib_cc_decode",
5052
"ccx_demuxer",
@@ -118,7 +120,7 @@ fn main() {
118120

119121
// Tell cargo to invalidate the built crate whenever any of the
120122
// included header files changed.
121-
builder = builder.parse_callbacks(Box::new(bindgen::CargoCallbacks));
123+
builder = builder.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()));
122124

123125
for type_name in allowlist_types {
124126
builder = builder.allowlist_type(type_name);

0 commit comments

Comments
 (0)