[retro-gtk/c-port: 27/37] Port CoreError to C



commit d4426b469c51d30ead3f832f76bcd77c42d372cd
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Mon Sep 25 13:06:19 2017 +0200

    Port CoreError to C

 retro-gtk/Makefile.am     |    1 -
 retro-gtk/core-error.vala |    7 -------
 retro-gtk/retro-core.c    |   14 ++++++++++++++
 3 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/retro-gtk/Makefile.am b/retro-gtk/Makefile.am
index 4c65801..f8af196 100644
--- a/retro-gtk/Makefile.am
+++ b/retro-gtk/Makefile.am
@@ -31,7 +31,6 @@ libretro_gtk_la_SOURCES = \
        input/retro-keyboard-key.c \
        \
        core.vala \
-       core-error.vala \
        retro.vala \
        retro-cairo-display.c \
        retro-core-descriptor.c \
diff --git a/retro-gtk/retro-core.c b/retro-gtk/retro-core.c
index 9fac28c..409f208 100644
--- a/retro-gtk/retro-core.c
+++ b/retro-gtk/retro-core.c
@@ -13,6 +13,14 @@ struct _RetroControllerIterator
 
 G_DEFINE_TYPE (RetroControllerIterator, retro_controller_iterator, G_TYPE_OBJECT)
 
+#define RETRO_CORE_ERROR (retro_core_error_quark ())
+
+enum {
+  RETRO_CORE_ERROR_COULDNT_SERIALIZE,
+  RETRO_CORE_ERROR_COULDNT_DESERIALIZE,
+  RETRO_CORE_ERROR_SERIALIZATION_NOT_SUPPORTED,
+};
+
 /* Private */
 
 static void
@@ -53,6 +61,12 @@ static GRecMutex retro_core_w_mutex = { 0 };
 static RetroCore *retro_core_objects[32];
 static gint retro_core_i = 0;
 
+static GQuark
+retro_core_error_quark (void)
+{
+  return g_quark_from_static_string ("retro-core-error-quark");
+}
+
 // FIXME Make static as soon as possible.
 void
 retro_core_push_cb_data (RetroCore *self)


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