Deprecation question - is proposed code-change back-portable to V1.8.7?
Hi all, In working with Guile V2.0.6, compiling the following code gives deprecation errors for both scm_sym2var and scm_module_lookup_closure. >From looking at the docs following the recommendations in the deprecation messages, it looks like the offending line needs to change to return scm_module_variable ( module, sym); Does scm_module_variable internally do what scm_module_lookup_closure did, and if so, does Guile 1.8.7 do exactly the same as Guile 2.06? Asking hear as we're getting near to a release and I don't want to break anything bigtime on the LilyPond repo. Cheers, Ian Hulin /* Lookup SYM, but don't give error when it is not defined. */ SCM ly_module_lookup (SCM module, SCM sym) { #define FUNC_NAME __FUNCTION__ SCM_VALIDATE_MODULE (1, module); return scm_sym2var (sym, scm_module_lookup_closure (module), SCM_BOOL_F); #undef FUNC_NAME }
Re: Deprecation question - is proposed code-change back-portable to V1.8.7?
Hi, Ian Hulin skribis: > From looking at the docs following the recommendations in the > deprecation messages, it looks like the offending line needs to change to > return scm_module_variable ( module, sym); > > Does scm_module_variable internally do what scm_module_lookup_closure > did, Yes. > and if so, does Guile 1.8.7 do exactly the same as Guile 2.06? Yes, but unfortunately, ‘scm_module_variable’ didn’t exist in Guile 1.8. So you’ll have to #ifdef to use one or the other. Thanks, Ludo’.
Re: Deprecation question - is proposed code-change back-portable to V1.8.7?
Hi Ludo, Many thanks for the quick response, Cheers, Ian On 16/08/12 14:51, Ludovic � wrote: > Hi, > > Ian Hulin skribis: > >> From looking at the docs following the recommendations in the >> deprecation messages, it looks like the offending line needs to >> change to return scm_module_variable ( module, sym); >> >> Does scm_module_variable internally do what >> scm_module_lookup_closure did, > > Yes. > >> and if so, does Guile 1.8.7 do exactly the same as Guile 2.06? > > Yes, but unfortunately, ‘scm_module_variable’ didn’t exist in > Guile 1.8. So you’ll have to #ifdef to use one or the other. > > Thanks, Ludo’. > > >