From 2b5812c64df5d91b9c827880b9a2428417e91411 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Sun, 11 Jan 2015 00:21:58 +0100 Subject: Deprecate scm_get_keyword * libguile/deprecated.c (scm_get_keyword): Deprecate. * libguile/deprecated.h: * libguile/goops.c: * libguile/goops.h: --- libguile/deprecated.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libguile/deprecated.c') 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 ("")); scm_class_top = scm_variable_ref (scm_c_lookup ("")); scm_class_object = scm_variable_ref (scm_c_lookup ("")); @@ -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")))) -- cgit v1.2.3