Here's a piece of code I'm having some problems with:
int main( string[] args ) {
var res = store_password_sync( NETWORK_PASSWORD, DEFAULT,
"Vala Test key", "the password", 0 );
return( 0 );
}
When compiled to C it results in the following:
gint _main (char** args, int args_length1) {
gint result;
GnomeKeyringResult res;
res = gnome_keyring_store_password_sync (gnome_keyring_NETWORK_PASSWORD,
GNOME_KEYRING_DEFAULT, "Vala Test key", "the password", 0, NULL);
result = 0;
return result;
}
The problem is of course that "gnome_keyring_NETWORK_PASSWORD" isn't declared
in the gnome-keyring.h header file, "GNOME_KEYRING_NETWORK_PASSWORD" is!
Looking at the relevant part of the vapi file I can't see why NETWORK_PASSWORD
doesn't get expanded correctly, while DEFAULT does:
[CCode (cheader_filename = "gnome-keyring.h")]
public static GnomeKeyring.PasswordSchema NETWORK_PASSWORD;
[CCode (cheader_filename = "gnome-keyring.h")]
public const string DEFAULT;
is it due to one being declared 'const' and the other not?
Any way, it's a bug so it should be fixed upstream. Should I file it in
Gnome's bugzilla or is an email enough?
In the meantime is there something I can do locally to make sure my code
compiles?
/M
--
Magnus Therning (OpenPGP: 0xAB4DFBA4)
magnus@therning.org Jabber: magnus@therning.org
http://therning.org/magnus identi.ca|twitter: magthe
_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list