[gnome-builder] meson: fix usage of toolchain cross-file



commit a0573fc7b21bd0cbd00552420c613143d1e35e82
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jan 23 10:06:41 2019 -0800

    meson: fix usage of toolchain cross-file

 src/plugins/meson/gbp-meson-build-stage-cross-file.c | 16 +++++++++-------
 src/plugins/meson/gbp-meson-build-stage-cross-file.h |  5 ++---
 src/plugins/meson/gbp-meson-pipeline-addin.c         |  2 +-
 3 files changed, 12 insertions(+), 11 deletions(-)
---
diff --git a/src/plugins/meson/gbp-meson-build-stage-cross-file.c 
b/src/plugins/meson/gbp-meson-build-stage-cross-file.c
index 34b1aefbb..6d6a8797c 100644
--- a/src/plugins/meson/gbp-meson-build-stage-cross-file.c
+++ b/src/plugins/meson/gbp-meson-build-stage-cross-file.c
@@ -182,19 +182,21 @@ gbp_meson_build_stage_cross_file_init (GbpMesonBuildStageCrossFile *self)
 }
 
 GbpMesonBuildStageCrossFile *
-gbp_meson_build_stage_cross_file_new (IdeContext    *context,
-                                      IdeToolchain  *toolchain)
+gbp_meson_build_stage_cross_file_new (IdeToolchain *toolchain)
 {
-  GbpMesonBuildStageCrossFile *build_stage = g_object_new (GBP_TYPE_MESON_BUILD_STAGE_CROSS_FILE,
-                                                           "context", context,
-                                                           NULL);
+  GbpMesonBuildStageCrossFile *build_stage;
+
+  g_return_val_if_fail (IDE_IS_TOOLCHAIN (toolchain), NULL);
+
+  build_stage = g_object_new (GBP_TYPE_MESON_BUILD_STAGE_CROSS_FILE, NULL);
   build_stage->toolchain = g_object_ref (toolchain);
-  return build_stage;
+
+  return g_steal_pointer (&build_stage);
 }
 
 gchar *
 gbp_meson_build_stage_cross_file_get_path (GbpMesonBuildStageCrossFile *stage,
-                                           IdePipeline            *pipeline)
+                                           IdePipeline                 *pipeline)
 {
   g_return_val_if_fail (GBP_IS_MESON_BUILD_STAGE_CROSS_FILE (stage), NULL);
   g_return_val_if_fail (IDE_IS_PIPELINE (pipeline), NULL);
diff --git a/src/plugins/meson/gbp-meson-build-stage-cross-file.h 
b/src/plugins/meson/gbp-meson-build-stage-cross-file.h
index 436c50f2e..0d1b9536c 100644
--- a/src/plugins/meson/gbp-meson-build-stage-cross-file.h
+++ b/src/plugins/meson/gbp-meson-build-stage-cross-file.h
@@ -30,9 +30,8 @@ G_BEGIN_DECLS
 
 G_DECLARE_FINAL_TYPE (GbpMesonBuildStageCrossFile, gbp_meson_build_stage_cross_file, GBP, 
MESON_BUILD_STAGE_CROSS_FILE, IdePipelineStage)
 
-GbpMesonBuildStageCrossFile *gbp_meson_build_stage_cross_file_new      (IdeContext                  *context,
-                                                                        IdeToolchain                
*toolchain);
+GbpMesonBuildStageCrossFile *gbp_meson_build_stage_cross_file_new      (IdeToolchain                
*toolchain);
 gchar                       *gbp_meson_build_stage_cross_file_get_path (GbpMesonBuildStageCrossFile *stage,
-                                                                        IdePipeline            *pipeline);
+                                                                        IdePipeline                 
*pipeline);
 
 G_END_DECLS
diff --git a/src/plugins/meson/gbp-meson-pipeline-addin.c b/src/plugins/meson/gbp-meson-pipeline-addin.c
index 26ad0c154..acc8f093d 100644
--- a/src/plugins/meson/gbp-meson-pipeline-addin.c
+++ b/src/plugins/meson/gbp-meson-pipeline-addin.c
@@ -190,7 +190,7 @@ gbp_meson_pipeline_addin_load (IdePipelineAddin *addin,
   else if (g_strcmp0 (ide_toolchain_get_id (toolchain), "default") != 0)
     {
       GbpMesonBuildStageCrossFile *cross_file_stage;
-      cross_file_stage = gbp_meson_build_stage_cross_file_new (context, toolchain);
+      cross_file_stage = gbp_meson_build_stage_cross_file_new (toolchain);
       crossbuild_file = gbp_meson_build_stage_cross_file_get_path (cross_file_stage, pipeline);
 
       id = ide_pipeline_attach (pipeline, IDE_PIPELINE_PHASE_PREPARE, 0, IDE_PIPELINE_STAGE 
(cross_file_stage));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]