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:
parent
0a1c93b869
commit
05166b3673
@ -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));
|
||||
|
@ -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")) {
|
||||
|
Loading…
Reference in New Issue
Block a user