From 2fbdb1fbef19bbcb6ebb37d03ea64a224c4616f2 Mon Sep 17 00:00:00 2001 From: Naoaki Iwakiri Date: Fri, 4 Nov 2022 14:21:29 +0900 Subject: [PATCH] Free preedit --- Cargo.lock | 2 +- Cargo.toml | 4 ++-- src/capi.rs | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 73f5c74..bccc24b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -53,7 +53,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cskk" -version = "1.0.1" +version = "1.1.0" dependencies = [ "anyhow", "bitflags", diff --git a/Cargo.toml b/Cargo.toml index afe601c..f2200b8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "cskk" # Have to also change the deb package destination filename below -version = "1.0.1" +version = "1.1.0" authors = ["Naoaki Iwakiri "] license = "GPL-3.0-or-later" edition = "2018" @@ -73,7 +73,7 @@ preserve-symlinks = true # x86_64 specific, depends on cargo-c too. # Includes development things like static link lib and header files too. assets = [["assets/**/*", "usr/local/share/libcskk", "644"], - ["target/x86_64-unknown-linux-gnu/release/libcskk.so", "usr/local/lib/cskk/libcskk.so.1.0.1", "755"], + ["target/x86_64-unknown-linux-gnu/release/libcskk.so", "usr/local/lib/cskk/libcskk.so.1.1.0", "755"], ["deb_assets/libcskk.*", "usr/local/lib/cskk", "777"], ["target/x86_64-unknown-linux-gnu/release/libcskk.a", "usr/local/lib/cskk/", "644"], ["target/x86_64-unknown-linux-gnu/release/cskk.pc", "usr/local/lib/pkgconfig/", "644"], diff --git a/src/capi.rs b/src/capi.rs index 1e5d9fa..e7c8e19 100644 --- a/src/capi.rs +++ b/src/capi.rs @@ -565,7 +565,8 @@ fn convert_precomposition_data(precomposition_data: PreCompositionData) -> PreCo /// # Safety /// ptrとlengthはskk_context_get_preedit_detailsの返り値でなければならない。 /// -pub unsafe extern "C" fn skk_free_preedit_details(ptr: *mut CskkStateInfoFfi, length: c_uint) { +#[no_mangle] +pub unsafe extern "C" fn skk_free_preedit_detail(ptr: *mut CskkStateInfoFfi, length: c_uint) { if ptr.is_null() { return; }