diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-03-01 05:04:45 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-25 14:36:46 +0200 |
commit | 2af04d6ec602b2068d35d5b976f070a1b065f307 (patch) | |
tree | 97965d941453a9d437a80f6fb022378586233b3d /src/parser.c | |
parent | cff67f93caeb3f98261860904dd232f6b551299e (diff) |
Fix compiler join thread, fix compiliation with clang
Diffstat (limited to 'src/parser.c')
-rw-r--r-- | src/parser.c | 8 |
1 files changed, 2 insertions, 6 deletions
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 +} |