[gnome-builder] autotools: pop old arguments before reusing launcher
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] autotools: pop old arguments before reusing launcher
- Date: Mon, 9 May 2016 10:28:21 +0000 (UTC)
commit bd206e1d7c08d5c37aadfdb5ed00521373d5077f
Author: Christian Hergert <chergert redhat com>
Date: Mon May 9 13:26:51 2016 +0300
autotools: pop old arguments before reusing launcher
We weren't really intending to reuse launchers, but it seems rather
convenient to be able to reuse the launcher at times.
plugins/autotools/ide-autotools-build-task.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/plugins/autotools/ide-autotools-build-task.c b/plugins/autotools/ide-autotools-build-task.c
index 06957fa..864aaec 100644
--- a/plugins/autotools/ide-autotools-build-task.c
+++ b/plugins/autotools/ide-autotools-build-task.c
@@ -627,6 +627,7 @@ log_and_spawn (IdeAutotoolsBuildTask *self,
GString *log;
gchar *item;
va_list args;
+ gint popcnt = 0;
g_assert (IDE_IS_AUTOTOOLS_BUILD_TASK (self));
g_assert (IDE_IS_SUBPROCESS_LAUNCHER (launcher));
@@ -640,6 +641,7 @@ log_and_spawn (IdeAutotoolsBuildTask *self,
{
ide_subprocess_launcher_push_argv (launcher, item);
g_string_append_printf (log, " '%s'", item);
+ popcnt++;
}
va_end (args);
@@ -650,6 +652,13 @@ log_and_spawn (IdeAutotoolsBuildTask *self,
ret = ide_subprocess_launcher_spawn_sync (launcher, cancellable, error);
+ /* pop make args */
+ for (; popcnt; popcnt--)
+ g_free (ide_subprocess_launcher_pop_argv (launcher));
+
+ /* pop "make" */
+ g_free (ide_subprocess_launcher_pop_argv (launcher));
+
return ret;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]