Skip to content

Commit 66525f3

Browse files
committed
fix xcompiler reserved stderr and stdout
fix used a uint instead of a guint
1 parent 0c32890 commit 66525f3

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

autorun/src/spawn.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525

2626
// container for spawn_with_callbacks IO
2727
typedef struct {
28-
GString* stdout;
29-
GString* stderr;
28+
GString* stdout_str;
29+
GString* stderr_str;
3030
GeanyDocument* doc;
3131

3232
} AUTORUN_ASYNC_DATA;
@@ -62,7 +62,7 @@ static void parse_command(const gchar* interceptor, GeanyDocument* doc, GSList**
6262
command_order[cmd->order] = elem;
6363
}
6464

65-
for (uint i = 0; i < g_slist_length(command_list); i++) {
65+
for (guint i = 0; i < g_slist_length(command_list); i++) {
6666
if (!command_order[i]) {
6767
break; // stop on the first null;
6868
}
@@ -193,10 +193,10 @@ static void stdioend_cb(G_GNUC_UNUSED GPid pid, G_GNUC_UNUSED gint wait_status,
193193
// spawn_with_callbacks runs this last and closes the child
194194
AUTORUN_ASYNC_DATA* exit_data = (AUTORUN_ASYNC_DATA*)user_data;
195195
// our stdout/stderr is complete. Display it.
196-
parse_output(exit_data->stdout->str);
197-
g_string_free(exit_data->stdout, TRUE);
198-
parse_output(exit_data->stderr->str);
199-
g_string_free(exit_data->stderr, TRUE);
196+
parse_output(exit_data->stdout_str->str);
197+
g_string_free(exit_data->stdout_str, TRUE);
198+
parse_output(exit_data->stderr_str->str);
199+
g_string_free(exit_data->stderr_str, TRUE);
200200
// if all the children have stopped
201201
if (--autorun_globals->children < 1) {
202202
// flip the ui_progress_bar back
@@ -228,8 +228,8 @@ void dispatch_run_async(GeanyDocument* doc) {
228228
GString* stdout_data = g_string_new(NULL);
229229
GString* stderr_data = g_string_new(NULL);
230230
AUTORUN_ASYNC_DATA* end_data = g_new0(AUTORUN_ASYNC_DATA, 1);
231-
end_data->stdout = stdout_data;
232-
end_data->stderr = stderr_data;
231+
end_data->stdout_str = stdout_data;
232+
end_data->stderr_str = stderr_data;
233233
end_data->doc = doc;
234234
GPid* child_pid = NULL;
235235
gboolean success = FALSE;

0 commit comments

Comments
 (0)