diff options
author | Andy Wingo <wingo@pobox.com> | 2015-01-11 00:21:58 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2015-01-23 16:16:01 +0100 |
commit | 2b5812c64df5d91b9c827880b9a2428417e91411 (patch) | |
tree | 20d016290c57d42cd4c5c344e64da72fb54c9c9b /libguile/deprecated.c | |
parent | 4a28ef1086a1fa6c890f7306ca81161cdd817119 (diff) | |
download | guile-2b5812c64df5d91b9c827880b9a2428417e91411.tar.gz |
Deprecate scm_get_keyword
* libguile/deprecated.c (scm_get_keyword): Deprecate.
* libguile/deprecated.h:
* libguile/goops.c:
* libguile/goops.h:
Diffstat (limited to 'libguile/deprecated.c')
-rw-r--r-- | libguile/deprecated.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libguile/deprecated.c b/libguile/deprecated.c index 1ca3227a4..4a82e4f5e 100644 --- a/libguile/deprecated.c +++ b/libguile/deprecated.c @@ -95,6 +95,8 @@ scm_memory_error (const char *subr) SCM scm_no_applicable_method = SCM_BOOL_F; +SCM var_get_keyword = SCM_BOOL_F; + SCM scm_class_boolean, scm_class_char, scm_class_pair; SCM scm_class_procedure, scm_class_string, scm_class_symbol; SCM scm_class_primitive_generic; @@ -131,6 +133,8 @@ scm_init_deprecated_goops (void) scm_no_applicable_method = scm_variable_ref (scm_c_lookup ("no-applicable-method")); + var_get_keyword = scm_c_lookup ("get-keyword"); + scm_class_class = scm_variable_ref (scm_c_lookup ("<class>")); scm_class_top = scm_variable_ref (scm_c_lookup ("<top>")); scm_class_object = scm_variable_ref (scm_c_lookup ("<object>")); @@ -192,6 +196,16 @@ scm_init_deprecated_goops (void) scm_smob_class = scm_i_smob_class; } +SCM +scm_get_keyword (SCM kw, SCM initargs, SCM default_value) +{ + scm_c_issue_deprecation_warning + ("scm_get_keyword is deprecated. Use `kw-arg-ref' from Scheme instead."); + + return scm_call_3 (scm_variable_ref (var_get_keyword), + kw, initargs, default_value); +} + #define BUFFSIZE 32 /* big enough for most uses */ #define SPEC_OF(x) \ (scm_slot_ref (x, scm_slot_ref (x, scm_from_latin1_symbol ("specializers")))) |