On Sun, Feb 24, 2013 at 03:07:15PM +0100, Jörg F. Wittenberger wrote: > it appears that the mutex-lock! declaration in types.db is not > currect. > > The second optional argument according to my reading of may be > either a thread (struct) or #f ; however types.db only expects > a thread.
You're right, the SRFI-18 docs clearly state that an explicit #f is also allowed, not just leaving off the argument. Attached is a patch for this, which I nominate for inclusion in the stability branch. It's so trivial I didn't bother to add a NEWS entry; feel free to write one up if you think it's important. Cheers, Peter -- http://www.more-magic.net
>From d92e01b7a8a69e12fdebebfaa3e22b53c6013c22 Mon Sep 17 00:00:00 2001 From: Peter Bex <peter....@xs4all.nl> Date: Tue, 26 Feb 2013 19:12:58 +0100 Subject: [PATCH] Fix mutex-unlock! type signature (thanks to Joerg Wittenberger for reporting this bug) --- types.db | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types.db b/types.db index 1d035cf..79ad37c 100644 --- a/types.db +++ b/types.db @@ -2298,7 +2298,7 @@ (make-condition-variable (#(procedure #:clean) make-condition-variable (#!optional *) (struct condition-variable))) (make-mutex (#(procedure #:clean) make-mutex (#!optional *) (struct mutex))) (make-thread (#(procedure #:clean #:enforce) make-thread ((procedure () . *) #!optional *) (struct thread))) -(mutex-lock! (#(procedure #:clean #:enforce) mutex-lock! ((struct mutex) #!optional * (struct thread)) boolean)) +(mutex-unlock! (#(procedure #:clean #:enforce) mutex-unlock! ((struct mutex) #!optional (struct condition-variable) *) undefined)) (mutex-name (#(procedure #:clean #:enforce) mutex-name ((struct mutex)) *) (((struct mutex)) (##sys#slot #(1) '1))) -- 1.8.0.1
_______________________________________________ Chicken-hackers mailing list Chicken-hackers@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-hackers