summaryrefslogtreecommitdiff
path: root/libguile/procprop.c
diff options
context:
space:
mode:
Diffstat (limited to 'libguile/procprop.c')
-rw-r--r--libguile/procprop.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/libguile/procprop.c b/libguile/procprop.c
index db16834c5..5054291b1 100644
--- a/libguile/procprop.c
+++ b/libguile/procprop.c
@@ -1,18 +1,19 @@
/* Copyright (C) 1995,1996,1998,2000,2001,2003,2004, 2006, 2008, 2009 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3 of
+ * the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
*/
@@ -32,6 +33,7 @@
#include "libguile/root.h"
#include "libguile/vectors.h"
#include "libguile/hashtab.h"
+#include "libguile/programs.h"
#include "libguile/validate.h"
#include "libguile/procprop.h"
@@ -71,6 +73,11 @@ scm_i_procedure_arity (SCM proc)
case scm_tc7_lsubr:
r = 1;
break;
+ case scm_tc7_program:
+ a += SCM_PROGRAM_DATA (proc)->nargs;
+ r = SCM_PROGRAM_DATA (proc)->nrest;
+ a -= r;
+ break;
case scm_tc7_lsubr_2:
a += 2;
r = 1;