Skip to content

Commit

Permalink
add: C APIの"delete"にセーフティネットを張る
Browse files Browse the repository at this point in the history
C APIにおいて次の状況に対してセーフティネットを張り、パニックするように
する。

1. オブジェクトが他スレッドでアクセスされている最中に"delete"を試みる
2. "delete"後に他の通常のメソッド関数の利用を試みる
3. "delete"後に"delete"を試みる

このPRは #836 の解決**ではなく**、ドキュメントにも手を加えていない。とい
うのも`VoicevoxVoiceModelFile`には次のゲッターメソッドがあり、これらをカ
バーするのは現状のAPIの形だと不可能だからである。

* `voicevox_voice_model_file_id`
* `voicevox_voice_model_file_get_metas_json`
  • Loading branch information
qryxip committed Oct 5, 2024
1 parent 20c3d8b commit 223a77b
Show file tree
Hide file tree
Showing 11 changed files with 480 additions and 144 deletions.
100 changes: 31 additions & 69 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ async_zip = "=0.0.16"
bindgen = "0.69.4"
binstall-tar = "0.4.42"
blocking = "1.6.1"
boxcar = "0.2.6"
bytes = "1.7.2"
camino = "1.1.9"
cargo_metadata = "0.18.1"
Expand Down Expand Up @@ -60,6 +61,7 @@ once_cell = "1.20.1"
ouroboros = "0.18.4"
parse-display = "0.8.2"
pollster = "0.3.0"
predicates = "3.1.2"
pretty_assertions = "1.4.1"
proc-macro2 = "1.0.86"
pyo3 = "0.20.3"
Expand Down
6 changes: 5 additions & 1 deletion crates/voicevox_core_c_api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ link-onnxruntime = ["voicevox_core/link-onnxruntime"]
[dependencies]
anstream = { workspace = true, default-features = false, features = ["auto"] }
anstyle-query.workspace = true
boxcar.workspace = true
camino.workspace = true
chrono = { workspace = true, default-features = false, features = ["clock"] }
colorchoice.workspace = true
const_format.workspace = true
cstr.workspace = true
derive-getters.workspace = true
derive_more.workspace = true
duplicate.workspace = true
easy-ext.workspace = true
itertools.workspace = true
libc.workspace = true
Expand All @@ -45,10 +47,12 @@ clap = { workspace = true, features = ["derive"] }
duct.workspace = true
easy-ext.workspace = true
inventory.workspace = true
indexmap = { workspace = true, features = ["serde"] }
libloading.workspace = true
libtest-mimic.workspace = true
ndarray.workspace = true
ndarray-stats.workspace = true
predicates.workspace = true
regex.workspace = true
serde = { workspace = true, features = ["derive"] }
serde_with.workspace = true
Expand Down
Loading

0 comments on commit 223a77b

Please sign in to comment.