mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 07:56:14 +01:00
Add gvdb_table_get_raw_value() API for GSettings
This commit is contained in:
parent
a35852bda3
commit
e5e491c969
@ -457,6 +457,29 @@ gvdb_table_get_value (GvdbTable *file,
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* gvdb_table_get_raw_value:
|
||||
* @table: a #GvdbTable
|
||||
* @key: a string
|
||||
* @returns: a #GVariant, or %NULL
|
||||
*
|
||||
* Looks up a value named @key in @file.
|
||||
*
|
||||
* This call is equivalent to gvdb_table_get_value() except that it
|
||||
* never byteswaps the value.
|
||||
**/
|
||||
GVariant *
|
||||
gvdb_table_get_raw_value (GvdbTable *table,
|
||||
const gchar *key)
|
||||
{
|
||||
const struct gvdb_hash_item *item;
|
||||
|
||||
if ((item = gvdb_table_lookup (table, key, 'v')) == NULL)
|
||||
return NULL;
|
||||
|
||||
return gvdb_table_value_from_item (table, item);
|
||||
}
|
||||
|
||||
/**
|
||||
* gvdb_table_get_table:
|
||||
* @file: a #GvdbTable
|
||||
|
@ -42,6 +42,9 @@ G_GNUC_INTERNAL
|
||||
GvdbTable * gvdb_table_get_table (GvdbTable *table,
|
||||
const gchar *key);
|
||||
G_GNUC_INTERNAL
|
||||
GVariant * gvdb_table_get_raw_value (GvdbTable *table,
|
||||
const gchar *key);
|
||||
G_GNUC_INTERNAL
|
||||
GVariant * gvdb_table_get_value (GvdbTable *table,
|
||||
const gchar *key);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user