[gnome-keyring/introspection: 7/7] gck: Fix some object introspection warnings



commit 6e07f0710ee33d19801b4f5636dafe6c18cdf804
Author: Stef Walter <stefw collabora co uk>
Date:   Thu Aug 11 22:37:20 2011 +0200

    gck: Fix some object introspection warnings

 gck/gck-misc.c   |    4 ++--
 gck/gck-module.c |    4 ++--
 gck/gck.h        |    5 +++--
 3 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gck/gck-misc.c b/gck/gck-misc.c
index 7f5fc32..6941ee1 100644
--- a/gck/gck-misc.c
+++ b/gck/gck-misc.c
@@ -140,8 +140,8 @@ gck_list_unref_free (GList *reflist)
  * Copy a list of GObject based pointers. All objects
  * in the list will be reffed and the list will be copied.
  *
- * Return value: The copied and reffed list. When done, free it with
- * gck_list_unref_free ()
+ * Return value: (transfer full): The copied and reffed list. When done,
+ * free it with gck_list_unref_free ()
  **/
 GList*
 gck_list_ref_copy (GList *reflist)
diff --git a/gck/gck-module.c b/gck/gck-module.c
index c7e7646..615dbc7 100644
--- a/gck/gck-module.c
+++ b/gck/gck-module.c
@@ -395,14 +395,14 @@ gck_module_initialize (const gchar *path, GError **error)
 	/* Load the actual module */
 	module = g_module_open (path, 0);
 	if (!module) {
-		g_set_error (error, GCK_ERROR, (int)CKR_GCK_MODULE_PROBLEM,
+		g_set_error (error, GCK_ERROR, GCK_ERROR_MODULE_PROBLEM,
 		             "Error loading pkcs11 module: %s", g_module_error ());
 		return NULL;
 	}
 
 	/* Get the entry point */
 	if (!g_module_symbol (module, "C_GetFunctionList", (void**)&get_function_list)) {
-		g_set_error (error, GCK_ERROR, (int)CKR_GCK_MODULE_PROBLEM,
+		g_set_error (error, GCK_ERROR, GCK_ERROR_MODULE_PROBLEM,
 		             "Invalid pkcs11 module: %s", g_module_error ());
 		g_module_close (module);
 		return NULL;
diff --git a/gck/gck.h b/gck/gck.h
index 4de88fd..746231c 100644
--- a/gck/gck.h
+++ b/gck/gck.h
@@ -43,8 +43,9 @@ G_BEGIN_DECLS
 
 #define             GCK_VENDOR_CODE                         0x47434B00 /* GCK */
 
-/* An error code which results from a failure to load the PKCS11 module */
-#define             CKR_GCK_MODULE_PROBLEM                  (CKR_VENDOR_DEFINED | (GCK_VENDOR_CODE + 1))
+typedef enum {
+	GCK_ERROR_MODULE_PROBLEM = (CKR_VENDOR_DEFINED | (GCK_VENDOR_CODE + 1)),
+} GckError;
 
 #define             GCK_ERROR                               (gck_get_error_quark ())
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]