diff options
author | Marius Vollmer <mvo@zagadka.de> | 2002-10-16 16:27:46 +0000 |
---|---|---|
committer | Marius Vollmer <mvo@zagadka.de> | 2002-10-16 16:27:46 +0000 |
commit | 028e573c8a2df385ba95d6ea6f64d62553098290 (patch) | |
tree | 41e68b67bf04c58fab782594a64f98c5efa195b0 /libguile/async.c | |
parent | 7751157e03b6abfee15901880486e0deabaa62d1 (diff) | |
download | guile-028e573c8a2df385ba95d6ea6f64d62553098290.tar.gz |
(scm_system_async_mark_for_thread): Validate thread argument.
Diffstat (limited to 'libguile/async.c')
-rw-r--r-- | libguile/async.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libguile/async.c b/libguile/async.c index 6b133fb68..3d99f5962 100644 --- a/libguile/async.c +++ b/libguile/async.c @@ -230,10 +230,13 @@ SCM_DEFINE (scm_system_async_mark_for_thread, "system-async-mark", 1, 1, 0, #define FUNC_NAME s_scm_system_async_mark_for_thread { #ifdef USE_THREADS + if (SCM_UNBNDP (thread)) + thread = scm_current_thread (); + else + SCM_VALIDATE_THREAD (2, thread); + scm_i_queue_async_cell (scm_cons (proc, SCM_BOOL_F), - (SCM_UNBNDP (thread) - ? scm_root - : scm_i_thread_root (thread))); + scm_i_thread_root (thread)); #else scm_i_queue_async_cell (scm_cons (proc, SCM_BOOL_F), scm_root); #endif |