]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/scm-hash.cc
Issue 5167/6: Changes: show \markup xxx = ... \etc assignments
[lilypond.git] / lily / scm-hash.cc
index 3eb40ada7bfe929576fc50cb1c081d368951b488..0b1e0b4e2532a7cc481ba4a794270aa3caa44799 100644 (file)
@@ -21,8 +21,6 @@
 
 #include <cassert>
 
-const char * const Scheme_hash_table::type_p_name_ = 0;
-
 SCM
 Scheme_hash_table::make_smob ()
 {
@@ -69,9 +67,13 @@ Scheme_hash_table::set (SCM k, SCM v)
 SCM
 Scheme_hash_table::get (SCM k) const
 {
-  /* SCM_UNSPECIFIED will stick out like a sore thumb, hopefully.
+  /* SCM_UNDEFINED is the default for unset elements, but
+     scm_hashq_ref cannot return it, so we do it a bit more awkwardly.
   */
-  return scm_hashq_ref (hash_tab (), k, SCM_UNSPECIFIED);
+  SCM handle = scm_hashq_get_handle (hash_tab (), k);
+  if (scm_is_pair (handle))
+    return scm_cdr (handle);
+  return SCM_UNDEFINED;
 }
 
 void