summaryrefslogtreecommitdiff
path: root/libguile/debug.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-10-24 18:13:51 +0200
committerAndy Wingo <wingo@pobox.com>2011-10-24 18:55:43 +0200
commit8c5bb72920a41d165726a1b5a610d823971f1ca8 (patch)
treeed9e8b3b2ff7d617557a6c5796f088b509e910ec /libguile/debug.c
parentfdecb44f3252e47ee98d95f3fe473ff898ddf27e (diff)
downloadguile-8c5bb72920a41d165726a1b5a610d823971f1ca8.tar.gz
add SCM_HEAP_OBJECT_P
* libguile/tags.h (SCM_HEAP_OBJECT_P): New macro, an alias for SCM_NIMP. * libguile/arrays.c: * libguile/debug.c: * libguile/foreign.c: * libguile/gdbint.c: * libguile/guardians.c: * libguile/list.c: * libguile/modules.c: * libguile/options.c: * libguile/smob.c: * libguile/validate.h: * libguile/weak-set.c: * libguile/weak-table.c: * libguile/weak-vector.c: Use it instead of SCM_NIMP or !SCM_IMP.
Diffstat (limited to 'libguile/debug.c')
-rw-r--r--libguile/debug.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/libguile/debug.c b/libguile/debug.c
index 1a5c197ee..c6ce99e7c 100644
--- a/libguile/debug.c
+++ b/libguile/debug.c
@@ -144,16 +144,9 @@ SCM_DEFINE (scm_procedure_source, "procedure-source", 1, 0, 0,
if (scm_is_true (src))
return src;
- switch (SCM_TYP7 (proc)) {
- case scm_tcs_struct:
- if (!SCM_STRUCT_APPLICABLE_P (proc)
- || SCM_IMP (SCM_STRUCT_PROCEDURE (proc)))
- break;
- proc = SCM_STRUCT_PROCEDURE (proc);
+ if (SCM_STRUCTP (proc) && SCM_STRUCT_APPLICABLE_P (proc)
+ && SCM_HEAP_OBJECT_P ((proc = SCM_STRUCT_PROCEDURE (proc))))
continue;
- default:
- break;
- }
}
while (0);