[retro-gtk] core: Make retro_core_get_name() return a const value
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk] core: Make retro_core_get_name() return a const value
- Date: Sun, 1 Aug 2021 14:31:14 +0000 (UTC)
commit cfea9f33d82d70fd32ee51c318048c1b33ec7842
Author: Adrien Plazas <kekun plazas laposte net>
Date: Sun Aug 1 16:11:02 2021 +0200
core: Make retro_core_get_name() return a const value
It is supposed to be constant in the first place and we don't transfer
its ownership.
retro-runner/retro-core-private.h | 2 +-
retro-runner/retro-core.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/retro-runner/retro-core-private.h b/retro-runner/retro-core-private.h
index 840975b..aa0f03d 100644
--- a/retro-runner/retro-core-private.h
+++ b/retro-runner/retro-core-private.h
@@ -69,7 +69,7 @@ RetroCore *retro_core_get_instance (void);
const gchar *retro_core_get_libretro_path (RetroCore *self);
void retro_core_set_support_no_game (RetroCore *self,
gboolean support_no_game);
-gchar *retro_core_get_name (RetroCore *self);
+const gchar *retro_core_get_name (RetroCore *self);
void retro_core_set_system_av_info (RetroCore *self,
RetroSystemAvInfo *system_av_info);
void retro_core_set_geometry (RetroCore *self,
diff --git a/retro-runner/retro-core.c b/retro-runner/retro-core.c
index 6d95283..7bb64ef 100644
--- a/retro-runner/retro-core.c
+++ b/retro-runner/retro-core.c
@@ -696,7 +696,7 @@ retro_core_set_geometry (RetroCore *self,
*
* Returns: (transfer none): the name of @self
*/
-gchar *
+const gchar *
retro_core_get_name (RetroCore *self)
{
RetroSystemInfo system_info = { 0 };
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]