aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--e-util/ChangeLog8
-rw-r--r--e-util/e-passwords.c5
-rw-r--r--e-util/e-passwords.h2
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,5 +1,13 @@
2001-10-11 Chris Toshok <toshok@ximian.com>
+ * 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 <toshok@ximian.com>
+
* e-passwords.c (e_passwords_init): open the bonobo config db for
our passwords.
(e_passwords_shutdown): sync and unref the bonobo db, and clear
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);