From 88e80089d15be094b0846712b798f9eeedaaa616 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Fri, 12 Oct 2001 02:01:38 +0000 Subject: change prototype for e_passwords_get_password. 2001-10-11 Chris Toshok * e-passwords.h: change prototype for e_passwords_get_password. * e-passwords.c (e_passwords_get_password): remove 'const' from return type - the return type is now allocated and must be freed by the caller. svn path=/trunk/; revision=13608 --- e-util/ChangeLog | 8 ++++++++ e-util/e-passwords.c | 5 +++-- e-util/e-passwords.h | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/e-util/ChangeLog b/e-util/ChangeLog index e8f6705dd1..b4920d4719 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,11 @@ +2001-10-11 Chris Toshok + + * e-passwords.h: change prototype for e_passwords_get_password. + + * e-passwords.c (e_passwords_get_password): remove 'const' from + return type - the return type is now allocated and must be freed + by the caller. + 2001-10-11 Chris Toshok * e-passwords.c (e_passwords_init): open the bonobo config db for diff --git a/e-util/e-passwords.c b/e-util/e-passwords.c index da400d0a5c..b201109b13 100644 --- a/e-util/e-passwords.c +++ b/e-util/e-passwords.c @@ -196,9 +196,10 @@ e_passwords_forget_password (const char *key) * e_passwords_get_password: * @key: the key * - * Return value: the password associated with @key, or %NULL. + * Return value: the password associated with @key, or %NULL. Caller + * must free the returned password. **/ -const char * +char * e_passwords_get_password (const char *key) { char *passwd = g_hash_table_lookup (passwords, key); diff --git a/e-util/e-passwords.h b/e-util/e-passwords.h index 9bc0de6540..101a419c4a 100644 --- a/e-util/e-passwords.h +++ b/e-util/e-passwords.h @@ -38,7 +38,7 @@ void e_passwords_shutdown (void); void e_passwords_remember_password (const char *key); void e_passwords_add_password (const char *key, const char *passwd); -const char *e_passwords_get_password (const char *key); +char *e_passwords_get_password (const char *key); void e_passwords_forget_password (const char *key); void e_passwords_forget_passwords (void); -- cgit v1.2.3