From: Han-Wen Nienhuys Date: Tue, 27 Dec 2005 23:39:16 +0000 (+0000) Subject: * lily/stencil-expression.cc: idem. X-Git-Tag: release/2.7.26~14 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=93f049e9a8e11ed1eabd82103636a227d8902cb8;p=lilypond.git * lily/stencil-expression.cc: idem. * lily/grob-interface-scheme.cc (LY_DEFINE): idem. * lily/function-documentation.cc (ly_add_function_documentation): use static member iso. Protected_scm * lily/main.cc: use ifdef ARGV0_RELOCATION iso. MINGW * config.make.in (prefix): remove HAVE_KPATHSEA_SO --- diff --git a/ChangeLog b/ChangeLog index affb81ba29..24f760965b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2005-12-28 Han-Wen Nienhuys + + * lily/stencil-expression.cc: idem. + + * lily/grob-interface-scheme.cc (LY_DEFINE): idem. + + * lily/function-documentation.cc (ly_add_function_documentation): + use static member iso. Protected_scm + + * lily/main.cc: use ifdef ARGV0_RELOCATION iso. MINGW + + * config.make.in (prefix): remove HAVE_KPATHSEA_SO + 2005-12-27 Jan Nieuwenhuizen * lily/relocate.cc (set_env_dir): New function. diff --git a/config.make.in b/config.make.in index 2f59f5786c..9ff945e856 100644 --- a/config.make.in +++ b/config.make.in @@ -31,8 +31,6 @@ PACKAGE = @PACKAGE@ package = @package@ PACKAGE_NAME = @PACKAGE_NAME@ -HAVE_LIBKPATHSEA_SO = @HAVE_LIBKPATHSEA_SO@ - prefix = @prefix@ exec_prefix = @exec_prefix@ diff --git a/lily/function-documentation.cc b/lily/function-documentation.cc index 9a1fb9daef..82a761e6b5 100644 --- a/lily/function-documentation.cc +++ b/lily/function-documentation.cc @@ -9,10 +9,10 @@ #include using namespace std; -#include "protected-scm.hh" #include "string.hh" +#include "lily-guile.hh" -static Protected_scm doc_hash_table; +static SCM doc_hash_table; void ly_add_function_documentation (SCM func, char const *fname, @@ -22,8 +22,8 @@ void ly_add_function_documentation (SCM func, if (!strlen (doc)) return; - if (scm_hash_table_p (doc_hash_table) != SCM_BOOL_T) - doc_hash_table = scm_c_make_hash_table (59); + if (!doc_hash_table) + doc_hash_table = scm_permanent_object (scm_c_make_hash_table (59)); String s = String (" - ") + "LilyPond procedure: " + fname + " " + varlist + "\n" + doc; diff --git a/lily/grob-interface-scheme.cc b/lily/grob-interface-scheme.cc index 288d55a939..633db2b115 100644 --- a/lily/grob-interface-scheme.cc +++ b/lily/grob-interface-scheme.cc @@ -7,10 +7,9 @@ */ #include "lily-guile.hh" -#include "protected-scm.hh" #include "string.hh" -Protected_scm all_ifaces; +static SCM all_ifaces; LY_DEFINE (ly_add_interface, "ly:add-interface", 3, 0, 0, (SCM a, SCM b, SCM c), @@ -19,9 +18,13 @@ LY_DEFINE (ly_add_interface, "ly:add-interface", SCM_ASSERT_TYPE (scm_is_symbol (a), a, SCM_ARG1, __FUNCTION__, "symbol"); SCM_ASSERT_TYPE (scm_is_string (b), b, SCM_ARG2, __FUNCTION__, "string"); SCM_ASSERT_TYPE (ly_is_list (c), c, SCM_ARG3, __FUNCTION__, "list of syms"); - if (!scm_is_vector (all_ifaces)) - all_ifaces = scm_make_vector (scm_from_int (40), SCM_EOL); - + 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); scm_hashq_set_x (all_ifaces, a, entry); diff --git a/lily/grob-property.cc b/lily/grob-property.cc index 168a120f41..8c68171fa9 100644 --- a/lily/grob-property.cc +++ b/lily/grob-property.cc @@ -108,6 +108,7 @@ Grob::internal_get_property (SCM sym) const #ifndef NDEBUG #include "protected-scm.hh" + Protected_scm grob_property_callback_stack = SCM_EOL; bool debug_property_callbacks = 0; #endif diff --git a/lily/main.cc b/lily/main.cc index d7505465e4..f97f00a287 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -87,7 +87,7 @@ bool make_print = true; bool relocate_binary = -#ifdef __MINGW32__ +#ifdef ARGV0_RELOCATION true; #else false diff --git a/lily/stencil-expression.cc b/lily/stencil-expression.cc index fb60ae26f8..072952ac59 100644 --- a/lily/stencil-expression.cc +++ b/lily/stencil-expression.cc @@ -9,15 +9,17 @@ #include "stencil.hh" -#include "protected-scm.hh" - -static Protected_scm heads = SCM_EOL; +static SCM heads; void register_stencil_head (SCM symbol) { + if (!heads) + heads = scm_permanent_object (scm_cons (SCM_EOL, SCM_EOL)); + scm_set_object_property_x (symbol, ly_symbol2scm ("stencil-head?"), SCM_BOOL_T); - heads = scm_cons (symbol, heads); + scm_set_cdr_x (heads, scm_cons (symbol, heads)); } + bool is_stencil_head (SCM symbol) { @@ -28,6 +30,6 @@ is_stencil_head (SCM symbol) SCM all_stencil_heads () { - return heads; + return scm_cdr (heads); }