-/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 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
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
\f
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <stdio.h>
#include "libguile/_scm.h"
#include "libguile/gsubr.h"
#include "libguile/deprecation.h"
+
+#include "libguile/private-options.h"
\f
/*
* gsubr.c
subr = scm_c_make_subr (name, scm_tc7_lsubr_2, fcn);
create_subr:
if (define)
- scm_define (SCM_SUBR_ENTRY(subr).name, subr);
+ scm_define (SCM_SNAME (subr), subr);
return subr;
default:
{
SCM cclo = scm_makcclo (scm_f_gsubr_apply, 3L);
SCM subr = scm_c_make_subr (name, scm_tc7_subr_0, fcn);
- SCM sym = SCM_SUBR_ENTRY(subr).name;
+ SCM sym = SCM_SNAME (subr);
if (SCM_GSUBR_MAX < req + opt + rst)
{
fprintf (stderr,
subr = scm_c_make_subr_with_generic (name, scm_tc7_lsubr_2, fcn, gf);
create_subr:
if (define)
- scm_define (SCM_SUBR_ENTRY(subr).name, subr);
+ scm_define (SCM_SNAME (subr), subr);
return subr;
default:
;
#endif
args = SCM_CDR (args);
for (i = 0; i < SCM_GSUBR_REQ (typ); i++) {
- if (SCM_NULLP (args))
+ if (scm_is_null (args))
scm_wrong_num_args (SCM_SNAME (SCM_GSUBR_PROC (self)));
v[i] = SCM_CAR(args);
args = SCM_CDR(args);
}
if (SCM_GSUBR_REST(typ))
v[i] = args;
- else if (!SCM_NULLP (args))
+ else if (!scm_is_null (args))
scm_wrong_num_args (SCM_SNAME (SCM_GSUBR_PROC (self)));
switch (n) {
case 2: return (*fcn)(v[0], v[1]);