[retro-gtk/c-port: 32/42] Port CoreError to C



commit 462bfaa097219307f62aad78cbfb61d8db90578e
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 31eb833..366fd29 100644
--- a/retro-gtk/Makefile.am
+++ b/retro-gtk/Makefile.am
@@ -76,7 +76,6 @@ libretro_gtk_la_SOURCES = \
        input/retro-keyboard-key.c \
        \
        core.vala \
-       core-error.vala \
        retro.vala \
        retro-cairo-display.c \
        retro-controller-iterator.c \
diff --git a/retro-gtk/retro-core.c b/retro-gtk/retro-core.c
index 4306c3a..9b4b294 100644
--- a/retro-gtk/retro-core.c
+++ b/retro-gtk/retro-core.c
@@ -6,6 +6,14 @@
 #include "retro-gtk-internal.h"
 #include "input/retro-keyboard-key.h"
 
+#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 */
 
 #define RETRO_CORE_OBJECTS_LENGTH 32
@@ -15,6 +23,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]