diff options
author | Andy Wingo <wingo@pobox.com> | 2011-05-01 20:30:54 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-05-01 20:55:50 +0200 |
commit | d1c4720ca382c5588a52108326343eaaab9063ca (patch) | |
tree | c583262003f9e3c78c91be7d49f09f1469289b5f /libguile/deprecated.c | |
parent | ecc9d1b547b21830f5ce4f1eaceb6b9dde44e5dc (diff) | |
download | guile-d1c4720ca382c5588a52108326343eaaab9063ca.tar.gz |
deprecate scm_whash API
* libguile/deprecated.h:
* libguile/deprecated.c (scm_whash_get_handle, SCM_WHASHFOUNDP)
(SCM_WHASHREF, SCM_WHASHSET, scm_whash_create_handle)
(scm_whash_lookup, scm_whash_insert): Deprecate this API.
* libguile/srcprop.c:
* libguile/srcprop.h:
* libguile/read.c (scm_read_sexp): Use the hashq API instead of the
whash API.
Diffstat (limited to 'libguile/deprecated.c')
-rw-r--r-- | libguile/deprecated.c | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/libguile/deprecated.c b/libguile/deprecated.c index 4d6027c35..a57de30b3 100644 --- a/libguile/deprecated.c +++ b/libguile/deprecated.c @@ -2499,6 +2499,70 @@ SCM_DEFINE (scm_primitive_property_del_x, "primitive-property-del!", 2, 0, 0, +SCM +scm_whash_get_handle (SCM whash, SCM key) +{ + scm_c_issue_deprecation_warning + ("The `scm_whash' API is deprecated. Use the `scm_hashq' API instead."); + + return scm_hashq_get_handle (whash, key); +} + +int +SCM_WHASHFOUNDP (SCM h) +{ + scm_c_issue_deprecation_warning + ("The `scm_whash' API is deprecated. Use the `scm_hashq' API instead."); + + return scm_is_true (h); +} + +SCM +SCM_WHASHREF (SCM whash, SCM handle) +{ + scm_c_issue_deprecation_warning + ("The `scm_whash' API is deprecated. Use the `scm_hashq' API instead."); + + return SCM_CDR (handle); +} + +void +SCM_WHASHSET (SCM whash, SCM handle, SCM obj) +{ + scm_c_issue_deprecation_warning + ("The `scm_whash' API is deprecated. Use the `scm_hashq' API instead."); + + SCM_SETCDR (handle, obj); +} + +SCM +scm_whash_create_handle (SCM whash, SCM key) +{ + scm_c_issue_deprecation_warning + ("The `scm_whash' API is deprecated. Use the `scm_hashq' API instead."); + + return scm_hashq_create_handle_x (whash, key, SCM_UNSPECIFIED); +} + +SCM +scm_whash_lookup (SCM whash, SCM obj) +{ + scm_c_issue_deprecation_warning + ("The `scm_whash' API is deprecated. Use the `scm_hashq' API instead."); + + return scm_hashq_ref (whash, obj, SCM_BOOL_F); +} + +void +scm_whash_insert (SCM whash, SCM key, SCM obj) +{ + scm_c_issue_deprecation_warning + ("The `scm_whash' API is deprecated. Use the `scm_hashq' API instead."); + + scm_hashq_set_x (whash, key, obj); +} + + void scm_i_init_deprecated () |