1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 19:50:24 +02:00

Type-check the OWNER argument of `lock-mutex'.

* libguile/threads.c (scm_lock_mutex_timed): Type-check OWNER.
This commit is contained in:
Ludovic Courtès 2011-07-01 19:10:18 +02:00
parent 4bc95fccad
commit 97ec95b728

View file

@ -1460,6 +1460,9 @@ SCM_DEFINE (scm_lock_mutex_timed, "lock-mutex", 1, 2, 0,
waittime = &cwaittime;
}
if (!SCM_UNBNDP (owner) && !scm_is_false (owner))
SCM_VALIDATE_THREAD (3, owner);
exception = fat_mutex_lock (m, waittime, owner, &ret);
if (!scm_is_false (exception))
scm_ithrow (SCM_CAR (exception), scm_list_1 (SCM_CDR (exception)), 1);