X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fscm-hash.cc;h=058f3be9d5a79a430597a0cfd4f8df94a11f5c97;hb=4d852ef65fc654e4ed02413926fc0cb78a1da1be;hp=af68717b4bccbe96ebc32f1085b845b62b6ba425;hpb=6d8867e4872cbec22beaa4be9d6a3412a0c108f7;p=lilypond.git diff --git a/lily/scm-hash.cc b/lily/scm-hash.cc index af68717b4b..058f3be9d5 100644 --- a/lily/scm-hash.cc +++ b/lily/scm-hash.cc @@ -1,9 +1,20 @@ /* - scm-hash.cc -- implement Scheme_hash_table + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 1999--2010 Han-Wen Nienhuys - (c) 1999--2007 Han-Wen Nienhuys + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include "scm-hash.hh" @@ -28,7 +39,8 @@ copy_handle (void *closure, SCM handle) static void copy_scm_hashes (SCM dest, SCM src) { - scm_internal_hash_for_each_handle ( (SCM (*)(GUILE_ELLIPSIS)) ©_handle, dest, src); + scm_internal_hash_for_each_handle ((scm_t_hash_handle_fn) ©_handle, + dest, src); } Scheme_hash_table::Scheme_hash_table () @@ -120,16 +132,19 @@ Scheme_hash_table::remove (SCM k) } static SCM -collect_handles (void *closure, SCM key, SCM value, SCM result) +collect_handles (void * /* closure */, + SCM key, + SCM value, + SCM result) { - (void) closure; return scm_acons(key, value, result); } SCM Scheme_hash_table::to_alist () const { - return scm_internal_hash_fold ((SCM (*)(GUILE_ELLIPSIS)) &collect_handles, NULL, SCM_EOL, hash_tab_); + return scm_internal_hash_fold ((scm_t_hash_fold_fn) &collect_handles, + NULL, SCM_EOL, hash_tab_); } IMPLEMENT_SMOBS (Scheme_hash_table);