mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
better scm_subr_p deprecation
* libguile/deprecated.h (scm_subr_p): Dispatch instead to scm_i_subr_p so we get link-time and run-time warnings. * libguile/deprecated.c (scm_i_subr_p): Here we call SCM_PRIMITIVE_P.
This commit is contained in:
parent
f1d19308ad
commit
97812f4d38
2 changed files with 9 additions and 1 deletions
|
@ -1785,6 +1785,13 @@ scm_trampoline_2 (SCM proc)
|
|||
return scm_call_2;
|
||||
}
|
||||
|
||||
int
|
||||
scm_i_subr_p (SCM x)
|
||||
{
|
||||
scm_c_issue_deprecation_warning ("`scm_subr_p' is deprecated. Use SCM_PRIMITIVE_P instead.");
|
||||
return SCM_PRIMITIVE_P (x);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
scm_i_init_deprecated ()
|
||||
|
|
|
@ -606,7 +606,8 @@ SCM_DEPRECATED scm_t_trampoline_2 scm_trampoline_2 (SCM proc);
|
|||
|
||||
|
||||
/* Deprecated 2010-01-05, use SCM_PRIMITIVE_P instead */
|
||||
#define scm_subr_p(x) (SCM_PRIMITIVE_P (x))
|
||||
SCM_DEPRECATED int scm_i_subr_p (SCM x);
|
||||
#define scm_subr_p(x) (scm_i_subr_p (x))
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue