HCoop
/
bpt
/
guile.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b95b1b8
)
make thunk? understand programs
author
Andy Wingo
<wingo@pobox.com>
Tue, 2 Sep 2008 07:49:50 +0000
(
00:49
-0700)
committer
Andy Wingo
<wingo@pobox.com>
Sun, 7 Sep 2008 20:27:18 +0000
(22:27 +0200)
* libguile/procs.c (thunk?): Return #t for thunk programs.
libguile/procs.c
patch
|
blob
|
blame
|
history
diff --git
a/libguile/procs.c
b/libguile/procs.c
index
2359eae
..
557da49
100644
(file)
--- a/
libguile/procs.c
+++ b/
libguile/procs.c
@@
-28,6
+28,7
@@
#include "libguile/validate.h"
#include "libguile/procs.h"
+#include "libguile/programs.h"
\f
@@
-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;