X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fgrob-interface-scheme.cc;h=11a5576169761bf4c4c436d7deb92e3b96bce9bc;hb=5d84bfad4626892bcffd05adcced53c8a2329047;hp=3caab844fd84966ac68bf73e859a818d53d4ac93;hpb=4bb29573149a0ffa1f881c5e38a0fe68e9e76b67;p=lilypond.git diff --git a/lily/grob-interface-scheme.cc b/lily/grob-interface-scheme.cc index 3caab844fd..11a5576169 100644 --- a/lily/grob-interface-scheme.cc +++ b/lily/grob-interface-scheme.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2005--2011 Han-Wen Nienhuys + Copyright (C) 2005--2015 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 @@ -19,20 +19,17 @@ #include "lily-guile.hh" #include "std-string.hh" +#include "protected-scm.hh" -static SCM all_ifaces; +static Protected_scm all_ifaces; void internal_add_interface (SCM a, SCM b, SCM c) { - if (!all_ifaces) - { - SCM tab = scm_c_make_hash_table (59); - all_ifaces = tab; - scm_permanent_object (tab); - } - - SCM entry = scm_list_n (a, b, c, SCM_UNDEFINED); + if (!all_ifaces.is_bound ()) + all_ifaces = scm_c_make_hash_table (59); + + SCM entry = scm_list_3 (a, b, c); scm_hashq_set_x (all_ifaces, a, entry); }