diff options
author | Andy Wingo <wingo@pobox.com> | 2010-01-06 11:09:56 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2010-01-07 23:49:22 +0100 |
commit | 97812f4d38b1077c87e8fde02b1d62da6a1a6a06 (patch) | |
tree | ac5fe8f21b5ca14a50bdf26df7416a8d0276e0cb | |
parent | f1d19308ade7f7d115be243650270e8a2a38fc38 (diff) | |
download | guile-97812f4d38b1077c87e8fde02b1d62da6a1a6a06.tar.gz |
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.
-rw-r--r-- | libguile/deprecated.c | 7 | ||||
-rw-r--r-- | libguile/deprecated.h | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/libguile/deprecated.c b/libguile/deprecated.c index f428bd4bf..e8cec8ad4 100644 --- a/libguile/deprecated.c +++ b/libguile/deprecated.c @@ -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 () diff --git a/libguile/deprecated.h b/libguile/deprecated.h index f7b053c55..8ecd8b241 100644 --- a/libguile/deprecated.h +++ b/libguile/deprecated.h @@ -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)) |