[aisleriot] Support guile 2.0
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aisleriot] Support guile 2.0
- Date: Tue, 12 Apr 2011 21:14:52 +0000 (UTC)
commit 57f08c221d6ebe7f165652762f542a11adac6a43
Author: Christian Persch <chpe gnome org>
Date: Tue Apr 12 23:03:22 2011 +0200
Support guile 2.0
Bug #630334.
configure.ac | 14 +++++++++++++-
src/game.c | 4 ++--
2 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 632dc35..92da707 100644
--- a/configure.ac
+++ b/configure.ac
@@ -513,8 +513,20 @@ IT_PROG_INTLTOOL([0.35.0])
# *****
GUILE_1_8_REQUIRED=1.8.0
+GUILE_2_0_REQUIRED=2.0.0
+GUILE_2_2_REQUIRED=2.0.0
-PKG_CHECK_MODULES([GUILE],[guile-1.8 >= $GUILE_1_8_REQUIRED])
+GUILE_PKGS=
+
+AC_MSG_CHECKING([for guile version])
+PKG_CHECK_EXISTS([guile-2.2 >= $GUILE_2_2_REQUIRED],
+ [GUILE_API_VERSION="2.2" GUILE_PKGS="guile-2.2 >= $GUILE_2_2_REQUIRED"],
+ [PKG_CHECK_EXISTS([guile-2.0 >= $GUILE_2_0_REQUIRED],
+ [GUILE_API_VERSION="2.0" GUILE_PKGS="guile-2.0 >= $GUILE_2_0_REQUIRED"],
+ [GUILE_API_VERSION="1.8" GUILE_PKGS="guile-1.8 >= $GUILE_1_8_REQUIRED"])])
+AC_MSG_RESULT([$GUILE_API_VERSION])
+
+PKG_CHECK_MODULES([GUILE],[$GUILE_PKGS])
# *************
# Documentation
diff --git a/src/game.c b/src/game.c
index 461fc67..03e96af 100644
--- a/src/game.c
+++ b/src/game.c
@@ -317,8 +317,8 @@ cscmi_exception_get_backtrace (SCM tag, SCM throw_args)
free (string);
g_string_append (message, "\n\nBacktrace:\n");
- stack = scm_fluid_ref (SCM_VARIABLE_REF (scm_the_last_stack_fluid_var));
- if (!SCM_FALSEP (stack)) {
+ stack = scm_make_stack (SCM_BOOL_T, SCM_EOL);
+ if (!scm_is_false (stack)) {
scm_display_backtrace (stack, port, SCM_UNDEFINED, SCM_UNDEFINED);
string = scm_to_locale_string (scm_get_output_string (port));
g_string_append (message, string);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]