From 2af04d6ec602b2068d35d5b976f070a1b065f307 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 1 Mar 2019 05:04:45 +0100 Subject: Fix compiler join thread, fix compiliation with clang --- src/parser.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/parser.c') diff --git a/src/parser.c b/src/parser.c index bb7c8d3..81f0a92 100644 --- a/src/parser.c +++ b/src/parser.c @@ -33,13 +33,9 @@ int parser_thread_data_start(ParserThreadData *self, AmalThreadCallbackFunc call } int parser_thread_data_join(ParserThreadData *self, void **result) { - int retval; if(self->status == PARSER_THREAD_STATUS_NEW) return 0; - retval = amal_thread_join(&self->thread, result); - if(retval == 0 || retval == AMAL_THREAD_NOT_JOINABLE) - self->status = PARSER_THREAD_STATUS_IDLE; - return retval; + return amal_thread_join(&self->thread, result); } int parser_init(Parser *self, amal_compiler *compiler, ScopedAllocator *allocator) { @@ -250,4 +246,4 @@ int parser_queue_file(Parser *self, BufferView path) { /* TODO: Parse special path (to include library path with dots) */ return_if_error(amal_compiler_load_file(self->compiler, path)); return PARSER_OK; -} \ No newline at end of file +} -- cgit v1.2.3