diff options
author | Vika <vika@fireburn.ru> | 2025-01-30 08:49:22 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2025-01-30 08:49:22 +0300 |
commit | 62263e0e619625f2c5dd0b4364b43bd4fefc8ccd (patch) | |
tree | c796d7f78c2205dff77eacb02d43024a254c6d67 /libsecret/src/schema.rs | |
parent | 320de85d04061ccc3ce50fb9a460a28068f7146a (diff) | |
download | bowl-62263e0e619625f2c5dd0b4364b43bd4fefc8ccd.tar.zst |
libsecret: 0.6.0 (private fork) -> 0.7.0 (upstream)
libsecret is now maintained again! No need for a private fork.
Diffstat (limited to 'libsecret/src/schema.rs')
-rw-r--r-- | libsecret/src/schema.rs | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/libsecret/src/schema.rs b/libsecret/src/schema.rs deleted file mode 100644 index b3252e2..0000000 --- a/libsecret/src/schema.rs +++ /dev/null @@ -1,37 +0,0 @@ -use crate::{Schema, SchemaAttributeType, SchemaFlags}; -use glib::translate::*; -use std::collections::HashMap; - -impl Schema { - #[doc(alias = "secret_schema_new")] - #[doc(alias = "secret_schema_newv")] - pub fn new( - name: &str, - flags: SchemaFlags, - attribute_names_and_types: HashMap<&str, SchemaAttributeType>, - ) -> Self { - unsafe { - let hash_table = glib::ffi::g_hash_table_new_full( - Some(glib::ffi::g_str_hash), - Some(glib::ffi::g_str_equal), - Some(glib::ffi::g_free), - None, - ); - - for (name, type_) in attribute_names_and_types { - let key_ptr: *mut libc::c_char = name.to_glib_full(); - glib::ffi::g_hash_table_insert( - hash_table, - key_ptr as *mut _, - type_.into_glib() as *mut _, - ); - } - - from_glib_full(ffi::secret_schema_newv( - name.to_glib_none().0, - flags.into_glib(), - hash_table, - )) - } - } -} |