mirror of
https://gitlab.gnome.org/GNOME/libsecret.git
synced 2024-12-22 20:58:52 +00:00
Secret item schema name is optional
Initialize the schema_name so that NULL is returned when the schema name is absent, instead of an uninitialized memory. Mark return value as nullable to indicate this for introspection and documentation.
This commit is contained in:
parent
0838b3316b
commit
5a217c5cae
@ -1745,12 +1745,12 @@ secret_item_set_secret_sync (SecretItem *self,
|
|||||||
* Gets the name of the schema that this item was stored with. This is also
|
* Gets the name of the schema that this item was stored with. This is also
|
||||||
* available at the <literal>xdg:schema</literal> attribute.
|
* available at the <literal>xdg:schema</literal> attribute.
|
||||||
*
|
*
|
||||||
* Returns: (transfer full): the schema name
|
* Returns: (nullable) (transfer full): the schema name
|
||||||
*/
|
*/
|
||||||
gchar *
|
gchar *
|
||||||
secret_item_get_schema_name (SecretItem *self)
|
secret_item_get_schema_name (SecretItem *self)
|
||||||
{
|
{
|
||||||
gchar *schema_name;
|
gchar *schema_name = NULL;
|
||||||
GVariant *variant;
|
GVariant *variant;
|
||||||
|
|
||||||
g_return_val_if_fail (SECRET_IS_ITEM (self), NULL);
|
g_return_val_if_fail (SECRET_IS_ITEM (self), NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user