g++-friendly 'Rework iothread_perform for void return types'

Allows iothread_perform to work with void return types on both
g++ and clang

This reverts commit 1040b255c7
and reintroduces ac9a0f0dbf
This commit is contained in:
ridiculousfish
2017-01-24 09:30:30 -08:00
parent ec19159580
commit a3dbca90d5
4 changed files with 38 additions and 12 deletions

View File

@@ -1222,7 +1222,7 @@ static void update_autosuggestion(void) {
const editable_line_t *el = data->active_edit_line();
autosuggestion_context_t *ctx =
new autosuggestion_context_t(data->history, el->text, el->position);
iothread_perform(threaded_autosuggest, autosuggest_completed, ctx);
iothread_perform(&threaded_autosuggest, &autosuggest_completed, ctx);
}
}
@@ -2178,7 +2178,7 @@ static void reader_super_highlight_me_plenty(int match_highlight_pos_adjust, boo
highlight_complete(ctx, result);
} else {
// Highlighting including I/O proceeds in the background.
iothread_perform(threaded_highlight, highlight_complete, ctx);
iothread_perform(&threaded_highlight, &highlight_complete, ctx);
}
highlight_search();