[retro-gtk/wip/aplazas/c-port: 17/25] Port CoreError to C



commit f7ab70f84ffd1f83a665585301bc0d3a9a7cbd5b
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 226e56e..063066f 100644
--- a/retro-gtk/Makefile.am
+++ b/retro-gtk/Makefile.am
@@ -77,7 +77,6 @@ libretro_gtk_la_SOURCES = \
        input/retro-keyboard-key.c \
        \
        core.vala \
-       core-error.vala \
        retro.vala \
        retro-analog-id.c \
        retro-analog-index.c \
diff --git a/retro-gtk/retro-core.c b/retro-gtk/retro-core.c
index b055732..19b102c 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]