[gnome-db] Some correctos to improve GI on GDA



The attached patch correct some GError enum related definitions. This
will help GObject Introspection (GI) to detect correctly error codes.
This will help to improve GI on GDA.

-- 
Trabajar, la mejor arma para tu superación
"de grano en grano, se hace la arena" (R) (en trámite, pero para los
cuates: LIBRE)
From 1bd0d02c3134405af1f4d389fd19b2394e628aae Mon Sep 17 00:00:00 2001
From: Daniel Espinosa Ortiz <esodan esodan-laptop (none)>
Date: Tue, 9 Mar 2010 12:09:47 -0600
Subject: [PATCH] GError enum definitions corrections

---
 libgda/gda-batch.c                            |    2 +-
 libgda/gda-batch.h                            |    4 ++++
 libgda/gda-data-select.h                      |    4 ++--
 libgda/sql-parser/gda-statement-struct-decl.h |    2 +-
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/libgda/gda-batch.c b/libgda/gda-batch.c
index c26f82f..d6a9bca 100644
--- a/libgda/gda-batch.c
+++ b/libgda/gda-batch.c
@@ -437,7 +437,7 @@ gda_batch_get_parameters (GdaBatch *batch, GdaSet **out_params, GError **error)
 						if (!eholder ||
 						    (gda_holder_get_g_type (eholder) != (gda_holder_get_g_type (holder)))) {
 							/* error */
-							g_set_error (error, GDA_BATCH_ERROR, 0,
+							g_set_error (error, GDA_BATCH_ERROR, GDA_BATCH_CONFLICTING_PARAMETER_ERROR,
 								     _("Conflicting parameter '%s'"), gda_holder_get_id (holder));
 							g_object_unref (tmpset);
 							g_object_unref (set);
diff --git a/libgda/gda-batch.h b/libgda/gda-batch.h
index 3bca875..8462336 100644
--- a/libgda/gda-batch.h
+++ b/libgda/gda-batch.h
@@ -36,6 +36,10 @@ G_BEGIN_DECLS
 extern GQuark gda_batch_error_quark (void);
 #define GDA_BATCH_ERROR gda_batch_error_quark ()
 
+typedef enum {
+	GDA_BATCH_CONFLICTING_PARAMETER_ERROR
+} GdaBatchError;
+
 /* struct for the object's data */
 struct _GdaBatch
 {
diff --git a/libgda/gda-data-select.h b/libgda/gda-data-select.h
index 85cb733..a25f65a 100644
--- a/libgda/gda-data-select.h
+++ b/libgda/gda-data-select.h
@@ -44,14 +44,14 @@ typedef struct _GdaDataSelectPrivate GdaDataSelectPrivate;
 extern GQuark gda_data_select_error_quark (void);
 #define GDA_DATA_SELECT_ERROR gda_data_select_error_quark ()
 
-enum {
+typedef enum {
 	GDA_DATA_SELECT_MODIFICATION_STATEMENT_ERROR,
 	GDA_DATA_SELECT_MISSING_MODIFICATION_STATEMENT_ERROR,
 	GDA_DATA_SELECT_CONNECTION_ERROR,
 	GDA_DATA_SELECT_ACCESS_ERROR,
 	GDA_DATA_SELECT_SQL_ERROR,
 	GDA_DATA_SELECT_SAFETY_LOCKED_ERROR
-};
+} GdaDataSelectError;
 
 struct _GdaDataSelect {
 	GObject           object;
diff --git a/libgda/sql-parser/gda-statement-struct-decl.h b/libgda/sql-parser/gda-statement-struct-decl.h
index 30df061..40de039 100644
--- a/libgda/sql-parser/gda-statement-struct-decl.h
+++ b/libgda/sql-parser/gda-statement-struct-decl.h
@@ -37,7 +37,7 @@ typedef enum {
 	GDA_SQL_MALFORMED_IDENTIFIER_ERROR,
 	GDA_SQL_MISSING_IDENTIFIER_ERROR,
 	GDA_SQL_VALIDATION_ERROR
-} GdaSqlErrorType;
+} GdaSqlError;
 
 /*
  * Struct declarations
-- 
1.6.3.3



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