1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-16 16:50:21 +02:00

* smob.h (scm_smob_descriptor): Added apply\' and gsubr_type\'.

* smob.c (scm_make_smob_type): Initialize `apply\' and `gsubr_type\'.
(scm_set_smob_apply): New function.
(scm_smob_apply_0, scm_smob_apply_1, scm_smob_apply_2,
scm_smob_apply_3): New functions.
* eval.c (SCM_CEVAL, SCM_APPLY): Added dispatch for applicable smobs.
* procs.c (s_scm_procedure_p): Check applicable smobs.
This commit is contained in:
Keisuke Nishida 2000-08-25 02:26:22 +00:00
parent 665fc4e600
commit 0717dfd871
4 changed files with 208 additions and 0 deletions

View file

@ -50,6 +50,7 @@
#include "libguile/objects.h"
#include "libguile/strings.h"
#include "libguile/vectors.h"
#include "libguile/smob.h"
#include "libguile/validate.h"
#include "libguile/procs.h"
@ -198,6 +199,8 @@ SCM_DEFINE (scm_procedure_p, "procedure?", 1, 0, 0,
#endif
case scm_tc7_pws:
return SCM_BOOL_T;
case scm_tc7_smob:
return SCM_BOOL (SCM_SMOB_DESCRIPTOR (obj).apply);
default:
return SCM_BOOL_F;
}