summaryrefslogtreecommitdiff
path: root/libguile/procs.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2008-09-02 00:49:50 -0700
committerAndy Wingo <wingo@pobox.com>2008-09-07 22:27:18 +0200
commit7e58032880b97df1fd9c1c8626dd778de28cec5a (patch)
tree09759fc098de619347283549ed2c4fec095d0a8d /libguile/procs.c
parentb95b1b835e932116b9b771e8de933afaaa1e0d9d (diff)
make thunk? understand programs
* libguile/procs.c (thunk?): Return #t for thunk programs.
Diffstat (limited to 'libguile/procs.c')
-rw-r--r--libguile/procs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libguile/procs.c b/libguile/procs.c
index 2359eae1f..557da4934 100644
--- a/libguile/procs.c
+++ b/libguile/procs.c
@@ -28,6 +28,7 @@
#include "libguile/validate.h"
#include "libguile/procs.h"
+#include "libguile/programs.h"
@@ -218,7 +219,9 @@ SCM_DEFINE (scm_thunk_p, "thunk?", 1, 0, 0,
obj = SCM_PROCEDURE (obj);
goto again;
default:
- ;
+ if (SCM_PROGRAM_P (obj) && SCM_PROGRAM_DATA (obj)->nargs == 0)
+ return SCM_BOOL_T;
+ /* otherwise fall through */
}
}
return SCM_BOOL_F;