mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-30 15:00:21 +02:00
* procprop.c: #include "libguile/smob.h"; Check applicable smobs.
This commit is contained in:
parent
14fb1c83d6
commit
5540e847f4
1 changed files with 16 additions and 8 deletions
|
@ -52,6 +52,7 @@
|
||||||
#include "libguile/procs.h"
|
#include "libguile/procs.h"
|
||||||
#include "libguile/gsubr.h"
|
#include "libguile/gsubr.h"
|
||||||
#include "libguile/objects.h"
|
#include "libguile/objects.h"
|
||||||
|
#include "libguile/smob.h"
|
||||||
#include "libguile/root.h"
|
#include "libguile/root.h"
|
||||||
#include "libguile/vectors.h"
|
#include "libguile/vectors.h"
|
||||||
|
|
||||||
|
@ -97,20 +98,27 @@ scm_i_procedure_arity (SCM proc)
|
||||||
a += 2;
|
a += 2;
|
||||||
r = 1;
|
r = 1;
|
||||||
break;
|
break;
|
||||||
#ifdef CCLO
|
case scm_tc7_smob:
|
||||||
case scm_tc7_cclo:
|
{
|
||||||
if (SCM_EQ_P (SCM_CCLO_SUBR (proc), scm_f_gsubr_apply))
|
int type;
|
||||||
|
if (!SCM_SMOB_DESCRIPTOR (proc).apply)
|
||||||
|
return SCM_BOOL_F;
|
||||||
|
type = SCM_SMOB_DESCRIPTOR (proc).gsubr_type;
|
||||||
|
goto gsubr_type;
|
||||||
|
case scm_tc7_cclo:
|
||||||
|
if (SCM_EQ_P (SCM_CCLO_SUBR (proc), scm_f_gsubr_apply))
|
||||||
{
|
{
|
||||||
int type = SCM_INUM (SCM_GSUBR_TYPE (proc));
|
type = SCM_INUM (SCM_GSUBR_TYPE (proc));
|
||||||
|
gsubr_type:
|
||||||
a += SCM_GSUBR_REQ (type);
|
a += SCM_GSUBR_REQ (type);
|
||||||
o = SCM_GSUBR_OPT (type);
|
o = SCM_GSUBR_OPT (type);
|
||||||
r = SCM_GSUBR_REST (type);
|
r = SCM_GSUBR_REST (type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
proc = SCM_CCLO_SUBR (proc);
|
proc = SCM_CCLO_SUBR (proc);
|
||||||
a -= 1;
|
a -= 1;
|
||||||
goto loop;
|
goto loop;
|
||||||
#endif
|
}
|
||||||
case scm_tc7_pws:
|
case scm_tc7_pws:
|
||||||
proc = SCM_PROCEDURE (proc);
|
proc = SCM_PROCEDURE (proc);
|
||||||
goto loop;
|
goto loop;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue