File fix-mruby-exception.patch of Package tsc

From 5af3841db0e8193f9970f18abde00641a563e301 Mon Sep 17 00:00:00 2001
From: "Bernhard M. Wiedemann" <bwiedemann@suse.de>
Date: Sat, 6 Dec 2025 06:43:42 +0000
Subject: [PATCH] Update mruby exception handling

It seems the old function is only provided by mruby/internal.h
and gave a linking error when I tried to use it.
---
 tsc/src/gui/game_console.cpp | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/tsc/src/gui/game_console.cpp b/tsc/src/gui/game_console.cpp
index 3838f8b..0b7dcef 100644
--- a/tsc/src/gui/game_console.cpp
+++ b/tsc/src/gui/game_console.cpp
@@ -280,7 +280,7 @@ bool cGame_Console::on_key_up(const CEGUI::EventArgs& evt)
 void cGame_Console::Display_Exception(mrb_state* p_mrb_state)
 {
     mrb_value exception   = mrb_obj_value(p_mrb_state->exc);
-    mrb_value bt          = mrb_exc_backtrace(p_mrb_state, exception);
+    mrb_print_backtrace(p_mrb_state);
     mrb_value rdesc       = mrb_funcall(p_mrb_state, exception, "message", 0);
     const char* classname = mrb_obj_classname(p_mrb_state, exception);
 
@@ -288,15 +288,6 @@ void cGame_Console::Display_Exception(mrb_state* p_mrb_state)
     message += ": ";
     message += std::string(RSTRING_PTR(rdesc), RSTRING_LEN(rdesc));
     Append_Text(message);
-
-    for(int i=0; i < RARRAY_LEN(bt); i++) {
-        std::string btline("    from ");
-        mrb_value rstep = mrb_ary_ref(p_mrb_state, bt, i);
-
-        btline += std::string(RSTRING_PTR(rstep), RSTRING_LEN(rstep));
-        btline += "\n";
-        Append_Text(btline);
-    }
 }
 
 /**
-- 
2.51.0

openSUSE Build Service is sponsored by