X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fmodule-scheme.cc;h=eda467fe68b259336663f08ccfaf72f1e2818afb;hb=da2cbdd4623e5ea51a2a99de4f2935b37195136e;hp=f926c44c0265e4992efb92a63b7f8886fe91d8c0;hpb=e8d5061834a5a658c5ffd078237e9cd660069a7d;p=lilypond.git diff --git a/lily/module-scheme.cc b/lily/module-scheme.cc index f926c44c02..eda467fe68 100644 --- a/lily/module-scheme.cc +++ b/lily/module-scheme.cc @@ -33,7 +33,7 @@ module_define_closure_func (void *closure, SCM val, SCM /* result */) { - SCM module = (SCM) closure; + SCM module = *static_cast (closure); if (to_boolean (scm_variable_bound_p (val))) scm_module_define (module, key, scm_variable_ref (val)); return SCM_EOL; @@ -46,7 +46,7 @@ LY_DEFINE (ly_module_copy, "ly:module-copy", #define FUNC_NAME __FUNCTION__ SCM_VALIDATE_MODULE (1, src); scm_internal_hash_fold ((scm_t_hash_fold_fn) &module_define_closure_func, - (void *) dest, + static_cast (&dest), SCM_EOL, SCM_MODULE_OBARRAY (src)); return SCM_UNSPECIFIED; } @@ -67,9 +67,9 @@ ly_module_lookup (SCM module, SCM sym) /* Issue 2758: Guile V2 onward has a scm_module_variable API module. - Guile V1.8.7 only has a (module-variable) REPL function, however - using ly_lily_module_constant ("module-variable") and calling - the memoized result is slow. + Guile V1.8.7 only has a (module-variable) REPL function and we + can't import this via Scm_variable since that needs + ly_module_lookup itself. */ #if GUILEV1 return scm_sym2var (sym, scm_module_lookup_closure (module), SCM_BOOL_F);