[Pkg-vala-maintainers] Bug#552399: [valac - vapi] errors in gnome-keyring-1.vapi
Estêvão Samuel Procópio
tevaum at gmail.com
Mon Oct 26 00:04:06 UTC 2009
Package: valac
Version: 0.7.7-3
I found a problem in two function definitions on the gnome-keyring-1.vapi file.
The first one is the GnomeKeyring.item_create_sync. It's define as:
public static GnomeKeyring.Result item_create_sync (string? keyring,
GnomeKeyring.ItemType type, string display_name,
GnomeKeyring.AttributeList attributes, string secret, bool
update_if_exists, uint32 item_id);
Gnome Keyring documentation
(http://library.gnome.org/devel/gnome-keyring/stable/gnome-keyring-gnome-keyring-items.html#gnome-keyring-item-create-sync)
states that item_id is a pointer which the function will use to return
the id of the created/updated keyring item. This way, the function
definition in the vapi file shoul be:
public static GnomeKeyring.Result item_create_sync (string? keyring,
GnomeKeyring.ItemType type, string display_name,
GnomeKeyring.AttributeList attributes, string secret, bool
update_if_exists, out uint32 item_id);
The same occurs with GnomeKeyring.find_items_sync which the last
parameter, GLib.List found should be an output parameter, but it's not
this way in the vapi file.
If the files are not automatically generated, I made a patch to solve
this issues. I'm developing a tool in vala to save and retrieve
password from GnomeKeyring and it only worked after this patch:
--- gnome-keyring-1.vapi.orig 2009-10-25 21:24:32.000000000 -0200
+++ gnome-keyring-1.vapi 2009-10-25 21:25:41.000000000 -0200
@@ -188,7 +188,7 @@
[CCode (cheader_filename = "gnome-keyring.h")]
public static void* find_items (GnomeKeyring.ItemType type,
GnomeKeyring.AttributeList attributes, owned
GnomeKeyring.OperationGetListCallback callback);
[CCode (cheader_filename = "gnome-keyring.h")]
- public static GnomeKeyring.Result find_items_sync
(GnomeKeyring.ItemType type, GnomeKeyring.AttributeList attributes,
GLib.List found);
+ public static GnomeKeyring.Result find_items_sync
(GnomeKeyring.ItemType type, GnomeKeyring.AttributeList attributes,
out GLib.List found);
[CCode (cheader_filename = "gnome-keyring.h")]
public static void* find_itemsv (GnomeKeyring.ItemType type,
owned GnomeKeyring.OperationGetListCallback callback, ...);
[CCode (cheader_filename = "gnome-keyring.h")]
@@ -228,7 +228,7 @@
[CCode (cheader_filename = "gnome-keyring.h")]
public static void* item_create (string? keyring,
GnomeKeyring.ItemType type, string display_name,
GnomeKeyring.AttributeList attributes, string secret, bool
update_if_exists, owned GnomeKeyring.OperationGetIntCallback
callback);
[CCode (cheader_filename = "gnome-keyring.h")]
- public static GnomeKeyring.Result item_create_sync (string?
keyring, GnomeKeyring.ItemType type, string display_name,
GnomeKeyring.AttributeList attributes, string secret, bool
update_if_exists, uint32 item_id);
+ public static GnomeKeyring.Result item_create_sync (string?
keyring, GnomeKeyring.ItemType type, string display_name,
GnomeKeyring.AttributeList attributes, string secret, bool
update_if_exists, out uint32 item_id);
[CCode (cheader_filename = "gnome-keyring.h")]
public static void* item_delete (string? keyring, uint32 id,
owned GnomeKeyring.OperationDoneCallback callback);
[CCode (cheader_filename = "gnome-keyring.h")]
Other *sync functions may also be with this problem, but I didn't
verify it myself.
More information about the Pkg-vala-maintainers
mailing list