-/* Copyright (C) 1995,1996,1998 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1998, 2000 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
\f
#include <stdio.h>
-#include "_scm.h"
+#include "libguile/_scm.h"
-#include "alist.h"
-#include "eval.h"
-#include "procs.h"
-#include "gsubr.h"
-#include "objects.h"
-#include "vectors.h"
+#include "libguile/alist.h"
+#include "libguile/eval.h"
+#include "libguile/procs.h"
+#include "libguile/gsubr.h"
+#include "libguile/objects.h"
+#include "libguile/smob.h"
+#include "libguile/root.h"
+#include "libguile/vectors.h"
-#include "validate.h"
-#include "procprop.h"
+#include "libguile/validate.h"
+#include "libguile/procprop.h"
\f
SCM_GLOBAL_SYMBOL (scm_sym_system_procedure, "system-procedure");
a += 2;
r = 1;
break;
-#ifdef CCLO
- case scm_tc7_cclo:
- if (SCM_CCLO_SUBR (proc) == scm_f_gsubr_apply)
+ case scm_tc7_smob:
+ {
+ 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);
o = SCM_GSUBR_OPT (type);
r = SCM_GSUBR_REST (type);
break;
}
- proc = SCM_CCLO_SUBR (proc);
- a -= 1;
- goto loop;
-#endif
+ proc = SCM_CCLO_SUBR (proc);
+ a -= 1;
+ goto loop;
+ }
case scm_tc7_pws:
proc = SCM_PROCEDURE (proc);
goto loop;
{
SCM answer;
answer = scm_assoc (proc, scm_stand_in_procs);
- if (answer == SCM_BOOL_F)
+ if (SCM_FALSEP (answer))
{
answer = scm_closure (scm_listify (SCM_EOL, SCM_BOOL_F, SCM_UNDEFINED),
SCM_EOL);
#define FUNC_NAME s_scm_procedure_property
{
SCM assoc;
- if (k == scm_sym_arity)
+ if (SCM_EQ_P (k, scm_sym_arity))
{
SCM arity;
SCM_ASSERT (SCM_NFALSEP (arity = scm_i_procedure_arity (p)),
if (!SCM_CLOSUREP (p))
p = scm_stand_in_scm_proc(p);
SCM_VALIDATE_CLOSURE (1,p);
- if (k == scm_sym_arity)
+ if (SCM_EQ_P (k, scm_sym_arity))
SCM_MISC_ERROR ("arity is a read-only property", SCM_EOL);
assoc = scm_sloppy_assq (k, SCM_PROCPROPS (p));
if (SCM_NIMP (assoc))
void
scm_init_procprop ()
{
-#include "procprop.x"
+#include "libguile/procprop.x"
}
+
+/*
+ Local Variables:
+ c-file-style: "gnu"
+ End:
+*/