mirror of
				https://github.com/janet-lang/janet
				synced 2025-10-31 15:43:01 +00:00 
			
		
		
		
	Fix proc getter bug.
This commit is contained in:
		| @@ -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")) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Calvin Rose
					Calvin Rose