[libgda] Remove the GdaError type, because GError now has a boxed type.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Remove the GdaError type, because GError now has a boxed type.
- Date: Wed, 30 Mar 2011 09:33:40 +0000 (UTC)
commit c4793c1aec633bb9887db6ea284f5c5c11f61960
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Mar 30 11:32:19 2011 +0200
Remove the GdaError type, because GError now has a boxed type.
See https://bugzilla.gnome.org/show_bug.cgi?id=300610#c6
libgda/gda-connection.c | 2 +-
libgda/gda-data-proxy.c | 2 +-
libgda/gda-holder.c | 2 +-
libgda/gda-init.c | 2 +-
libgda/gda-meta-store.c | 2 +-
libgda/gda-set.c | 4 ++--
libgda/gda-types.c | 18 ------------------
libgda/gda-types.h | 5 -----
8 files changed, 7 insertions(+), 30 deletions(-)
---
diff --git a/libgda/gda-connection.c b/libgda/gda-connection.c
index 956e714..0ea62a1 100644
--- a/libgda/gda-connection.c
+++ b/libgda/gda-connection.c
@@ -3226,7 +3226,7 @@ gda_connection_execute_non_select_command (GdaConnection *cnc, const gchar *sql,
*
* Executes @stmt.
*
- * As @stmt can, by desing (and if not abused), contain only one SQL statement, the
+ * As @stmt can, by design (and if not abused), contain only one SQL statement, the
* return object will either be:
* <itemizedlist>
* <listitem><para>a #GdaDataSelect object (which is also a #GdaDataModel) if @stmt is a SELECT statement
diff --git a/libgda/gda-data-proxy.c b/libgda/gda-data-proxy.c
index 3c1b8cd..b22df1d 100644
--- a/libgda/gda-data-proxy.c
+++ b/libgda/gda-data-proxy.c
@@ -613,7 +613,7 @@ gda_data_proxy_class_init (GdaDataProxyClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GdaDataProxyClass, validate_row_changes),
validate_row_changes_accumulator, NULL,
- _gda_marshal_ERROR__INT_INT, GDA_TYPE_ERROR, 2, G_TYPE_INT, G_TYPE_INT);
+ _gda_marshal_ERROR__INT_INT, G_TYPE_ERROR, 2, G_TYPE_INT, G_TYPE_INT);
/**
* GdaDataProxy::row-changes-applied
* @proxy: the #GdaDataProxy
diff --git a/libgda/gda-holder.c b/libgda/gda-holder.c
index 0cd9515..e7e2f30 100644
--- a/libgda/gda-holder.c
+++ b/libgda/gda-holder.c
@@ -241,7 +241,7 @@ gda_holder_class_init (GdaHolderClass *class)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GdaHolderClass, validate_change),
validate_change_accumulator, NULL,
- _gda_marshal_ERROR__VALUE, GDA_TYPE_ERROR, 1, G_TYPE_VALUE);
+ _gda_marshal_ERROR__VALUE, G_TYPE_ERROR, 1, G_TYPE_VALUE);
class->changed = NULL;
class->source_changed = NULL;
diff --git a/libgda/gda-init.c b/libgda/gda-init.c
index 1e537f8..0ee748c 100644
--- a/libgda/gda-init.c
+++ b/libgda/gda-init.c
@@ -166,7 +166,7 @@ gda_init (void)
g_assert (type);
type = GDA_TYPE_TIMESTAMP;
g_assert (type);
- type = GDA_TYPE_ERROR;
+ type = G_TYPE_ERROR;
g_assert (type);
/* acquire locale */
diff --git a/libgda/gda-meta-store.c b/libgda/gda-meta-store.c
index 420b2e0..7a78624 100644
--- a/libgda/gda-meta-store.c
+++ b/libgda/gda-meta-store.c
@@ -388,7 +388,7 @@ gda_meta_store_class_init (GdaMetaStoreClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GdaMetaStoreClass, suggest_update),
suggest_update_accumulator, NULL,
- _gda_marshal_ERROR__METACONTEXT, GDA_TYPE_ERROR,
+ _gda_marshal_ERROR__METACONTEXT, G_TYPE_ERROR,
1, GDA_TYPE_META_CONTEXT);
/**
* GdaMetaStore::meta-changed
diff --git a/libgda/gda-set.c b/libgda/gda-set.c
index 1b98dda..bb89784 100644
--- a/libgda/gda-set.c
+++ b/libgda/gda-set.c
@@ -267,7 +267,7 @@ gda_set_class_init (GdaSetClass *class)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GdaSetClass, validate_holder_change),
validate_accumulator, NULL,
- _gda_marshal_ERROR__OBJECT_VALUE, GDA_TYPE_ERROR, 2,
+ _gda_marshal_ERROR__OBJECT_VALUE, G_TYPE_ERROR, 2,
GDA_TYPE_HOLDER, G_TYPE_VALUE);
/**
* GdaSet::validate-set
@@ -285,7 +285,7 @@ gda_set_class_init (GdaSetClass *class)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GdaSetClass, validate_set),
validate_accumulator, NULL,
- _gda_marshal_ERROR__VOID, GDA_TYPE_ERROR, 0);
+ _gda_marshal_ERROR__VOID, G_TYPE_ERROR, 0);
/**
* GdaSet::holder-attr-changed
* @set: the #GdaSet
diff --git a/libgda/gda-types.c b/libgda/gda-types.c
index 900171d..ad9a6cc 100644
--- a/libgda/gda-types.c
+++ b/libgda/gda-types.c
@@ -21,24 +21,6 @@
#include "gda-types.h"
GType
-_gda_error_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0)) {
- static GStaticMutex registering = G_STATIC_MUTEX_INIT;
- g_static_mutex_lock (®istering);
- if (type == 0)
- type = g_boxed_type_register_static ("GdaError",
- (GBoxedCopyFunc) g_error_copy,
- (GBoxedFreeFunc) g_error_free);
- g_static_mutex_unlock (®istering);
- }
-
- return type;
-}
-
-GType
_gda_slist_get_type (void)
{
static GType type = 0;
diff --git a/libgda/gda-types.h b/libgda/gda-types.h
index 1580212..79f6c15 100644
--- a/libgda/gda-types.h
+++ b/libgda/gda-types.h
@@ -24,11 +24,6 @@
G_BEGIN_DECLS
-/* Boxed type for GError will not be done in GLib see bug #300610 */
-#define GDA_TYPE_ERROR (_gda_error_get_type())
-typedef GError GdaError;
-GType _gda_error_get_type (void) G_GNUC_CONST;
-
/* Pointer type for GSList (not a boxed type!) */
#define GDA_TYPE_SLIST (_gda_slist_get_type())
typedef GSList GdaSList;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]