mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-09 19:00:27 +02:00
scm_badargsp is deprecated
* libguile/eval.h: * libguile/eval.c: * libguile/deprecated.h * libguile/deprecated.c (scm_badargsp): Deprecate scm_badargsp.
This commit is contained in:
parent
df3f1090e8
commit
cc00f44743
4 changed files with 25 additions and 17 deletions
|
@ -1914,6 +1914,27 @@ SCM_DEFINE (scm_dynamic_args_call, "dynamic-args-call", 3, 0, 0,
|
|||
#undef FUNC_NAME
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int
|
||||
scm_badargsp (SCM formals, SCM args)
|
||||
{
|
||||
scm_c_issue_deprecation_warning
|
||||
("`scm_badargsp' is deprecated. Copy it into your project if you need it.");
|
||||
|
||||
while (!scm_is_null (formals))
|
||||
{
|
||||
if (!scm_is_pair (formals))
|
||||
return 0;
|
||||
if (scm_is_null (args))
|
||||
return 1;
|
||||
formals = scm_cdr (formals);
|
||||
args = scm_cdr (args);
|
||||
}
|
||||
return !scm_is_null (args) ? 1 : 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
|
|
|
@ -627,6 +627,9 @@ SCM_DEPRECATED SCM scm_raequal (SCM ra0, SCM ra1);
|
|||
/* Deprecated 2010-04-01, use the dynamic FFI instead */
|
||||
SCM_DEPRECATED SCM scm_dynamic_args_call (SCM symb, SCM dobj, SCM args);
|
||||
|
||||
/* Deprecated 2010-05-12, no replacement */
|
||||
SCM_DEPRECATED int scm_badargsp (SCM formals, SCM args);
|
||||
|
||||
|
||||
|
||||
void scm_i_init_deprecated (void);
|
||||
|
|
|
@ -130,21 +130,6 @@ static void error_used_before_defined (void)
|
|||
"Variable used before given a value", SCM_EOL, SCM_BOOL_F);
|
||||
}
|
||||
|
||||
int
|
||||
scm_badargsp (SCM formals, SCM args)
|
||||
{
|
||||
while (!scm_is_null (formals))
|
||||
{
|
||||
if (!scm_is_pair (formals))
|
||||
return 0;
|
||||
if (scm_is_null (args))
|
||||
return 1;
|
||||
formals = CDR (formals);
|
||||
args = CDR (args);
|
||||
}
|
||||
return !scm_is_null (args) ? 1 : 0;
|
||||
}
|
||||
|
||||
/* the environment:
|
||||
(VAL ... . MOD)
|
||||
If MOD is #f, it means the environment was captured before modules were
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#ifndef SCM_EVAL_H
|
||||
#define SCM_EVAL_H
|
||||
|
||||
/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002,2003,2004,2008,2009
|
||||
/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002,2003,2004,2008,2009,2010
|
||||
* Free Software Foundation, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
|
@ -63,7 +63,6 @@ typedef SCM (*scm_t_trampoline_2) (SCM proc, SCM arg1, SCM arg2);
|
|||
|
||||
|
||||
|
||||
SCM_API int scm_badargsp (SCM formals, SCM args);
|
||||
SCM_API SCM scm_call_0 (SCM proc);
|
||||
SCM_API SCM scm_call_1 (SCM proc, SCM arg1);
|
||||
SCM_API SCM scm_call_2 (SCM proc, SCM arg1, SCM arg2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue