[gnome-builder] makecache: allow mutating the target name
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] makecache: allow mutating the target name
- Date: Sun, 17 Apr 2016 14:23:45 +0000 (UTC)
commit cfdc02457f780517ee345c03b3e67808b964ac85
Author: Christian Hergert <chergert redhat com>
Date: Sun Apr 17 07:15:27 2016 -0700
makecache: allow mutating the target name
We need the ability to mutate target names when doing target translation.
This can happen when maping from .vala to .c and back.
plugins/autotools/ide-makecache-target.c | 10 ++++++++++
plugins/autotools/ide-makecache-target.h | 2 ++
2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/plugins/autotools/ide-makecache-target.c b/plugins/autotools/ide-makecache-target.c
index a7efbab..4fdfe38 100644
--- a/plugins/autotools/ide-makecache-target.c
+++ b/plugins/autotools/ide-makecache-target.c
@@ -98,6 +98,16 @@ ide_makecache_target_get_target (IdeMakecacheTarget *self)
return self->target;
}
+void
+ide_makecache_target_set_target (IdeMakecacheTarget *self,
+ const gchar *target)
+{
+ g_assert (self);
+
+ g_free (self->target);
+ self->target = g_strdup (target);
+}
+
guint
ide_makecache_target_hash (gconstpointer data)
{
diff --git a/plugins/autotools/ide-makecache-target.h b/plugins/autotools/ide-makecache-target.h
index 58891d1..5833d93 100644
--- a/plugins/autotools/ide-makecache-target.h
+++ b/plugins/autotools/ide-makecache-target.h
@@ -34,6 +34,8 @@ IdeMakecacheTarget *ide_makecache_target_ref (IdeMakecacheTarget *self);
void ide_makecache_target_unref (IdeMakecacheTarget *self);
const gchar *ide_makecache_target_get_target (IdeMakecacheTarget *self);
const gchar *ide_makecache_target_get_subdir (IdeMakecacheTarget *self);
+void ide_makecache_target_set_target (IdeMakecacheTarget *self,
+ const gchar *target);
guint ide_makecache_target_hash (gconstpointer data);
gboolean ide_makecache_target_equal (gconstpointer data1,
gconstpointer data2);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]