diff options
author | Ian Hulin <ian@hulin.org.uk> | 2012-09-16 22:10:13 +0100 |
---|---|---|
committer | Ian Hulin <ian@hulin.org.uk> | 2012-09-22 18:24:40 +0100 |
commit | b89b87d14b6a5b32f46ecdf10dfa0d023a34d3a2 (patch) | |
tree | 32806fe41710635056f333cb075f4525ae76e820 /flower | |
parent | 68d66bf3542ca2349dd0cd9bb89a945186db26fe (diff) |
Issue 2758. ly_module_lookup caused deprecation warnings with Guile V2.06.
The V2.17.0 definition of ly_module_lookup in module-scheme.cc uses two
functions, scm_sym2var and scm_module_lookup_closure, which issue
deprecation warnings in Guile V2.06. A call to the new Guile API function,
scm_module_variable, provides the functionality for both deprecated
routines, but has not been back-ported to Guile V1.8.
This patch adds a conditionally-compiled block when running with a Guile
version < V2.0, so that Guile V1 will not use the deprecated scm_ calls
in ly_module_lookup, and Guile V2 will use API call scm_module_variable.
Diffstat (limited to 'flower')
-rw-r--r-- | flower/include/guile-compatibility.hh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/flower/include/guile-compatibility.hh b/flower/include/guile-compatibility.hh index 7c249afe89..3ef0413772 100644 --- a/flower/include/guile-compatibility.hh +++ b/flower/include/guile-compatibility.hh @@ -36,4 +36,12 @@ Add any compatibility definitions here for Guile V2.n */ #endif // SCM_MAJOR_VERSION == 1 +#if defined (SCM_MAJOR_VERSION) && (SCM_MAJOR_VERSION > 1) +#define GUILEV2 1 +#endif +// TODO - remove GUILE1 definition when support for Guile 1 is dropped. +#if defined (SCM_MAJOR_VERSION) && (SCM_MAJOR_VERSION < 2) +#define GUILEV1 1 +#define GUILEV2 0 +#endif #endif /* GUILE_COMPATIBILITY_HH */ |