1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-25 09:47:17 +00:00

Fix proc getter bug.

This commit is contained in:
Calvin Rose 2020-12-31 16:19:41 -06:00
parent 0a1c93b869
commit 05166b3673
2 changed files with 1 additions and 5 deletions

View File

@ -962,12 +962,8 @@ void janet_ev_threaded_call(JanetThreadedSubroutine fp, JanetEVGenericMessage ar
init->cb = cb;
/* Create thread - TODO thread pool? */
pthread_attr_t attr;
pthread_t waiter_thread;
pthread_attr_init(&attr);
pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN);
int err = pthread_create(&waiter_thread, NULL, janet_thread_body, init);
pthread_attr_destroy(&attr);
if (err) {
free(init);
janet_panicf("%s", strerror(err));

View File

@ -544,7 +544,7 @@ static int janet_proc_get(void *p, Janet key, Janet *out) {
return 1;
}
if (janet_keyeq(key, "err")) {
*out = (NULL == proc->out) ? janet_wrap_nil() : janet_wrap_abstract(proc->err);
*out = (NULL == proc->err) ? janet_wrap_nil() : janet_wrap_abstract(proc->err);
return 1;
}
if ((-1 != proc->return_code) && janet_keyeq(key, "return-code")) {