From f42c2d7371d2a47729f2ee56d72f20a5b2c64fe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 16 Jan 2025 15:17:30 +0100 Subject: [PATCH] run-test: Switch to new argv API It's a bit nicer to use than manually defining the legacy ARGV array. Part-of: --- src/run-js-test.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/run-js-test.c b/src/run-js-test.c index 3f7c91eba..513a4ae43 100644 --- a/src/run-js-test.c +++ b/src/run-js-test.c @@ -71,13 +71,7 @@ main (int argc, char **argv) } /* prepare command line arguments */ - if (!gjs_context_define_string_array (js_context, "ARGV", - argc - 2, (const char**)argv + 2, - &error)) - { - g_printerr ("Failed to defined ARGV: %s\n", error->message); - exit (1); - } + gjs_context_set_argv (js_context, argc - 2, (const char**)argv + 2); filename = argv[1]; title = g_filename_display_basename (filename);