[education/rkward/kf5] rkward/rbackend: Fix backport

Thomas Friedrichsmeier null at kde.org
Tue Apr 22 13:11:30 BST 2025


Git commit 47d756171b42443b7d71aaefc6d00b0d6122b2f4 by Thomas Friedrichsmeier.
Committed on 22/04/2025 at 12:11.
Pushed by tfry into branch 'kf5'.

Fix backport

M  +2    -2    rkward/rbackend/rkrbackend.cpp
M  +2    -2    rkward/rbackend/rkreventloop.cpp

https://invent.kde.org/education/rkward/-/commit/47d756171b42443b7d71aaefc6d00b0d6122b2f4

diff --git a/rkward/rbackend/rkrbackend.cpp b/rkward/rbackend/rkrbackend.cpp
index d8e0f15db..4c8035351 100644
--- a/rkward/rbackend/rkrbackend.cpp
+++ b/rkward/rbackend/rkrbackend.cpp
@@ -306,7 +306,7 @@ int RReadConsole (const char* prompt, unsigned char* buf, int buflen, int hist)
 					n_frames = dummy->intVector ().at (0);
 				}
 				// What the ??? Why does this simple version always return 0?
-				//int n_frames = RKRSupport::SEXPToInt (RKRSupport::callSimpleFun0 (RFn::Rf_install ("sys.nframe"), ROb(R_GlobalEnv);
+				//int n_frames = RKRSupport::SEXPToInt (RKRSupport::callSimpleFun0 (Rf_install ("sys.nframe"), R_GlobalEnv));
 				if (n_frames < 1) {
 					// No active frames? This can't be a call to readline(), so the previous command must have finished.
 					if (RKRBackend::repl_status.user_command_completely_transmitted) {
@@ -1134,7 +1134,7 @@ bool RKRBackend::startR () {
 
 	connectCallbacks();
 	RKREventLoop::setRKEventHandler(doPendingPriorityCommands);
-	default_global_context = ROb(R_GlobalContext);
+	default_global_context = R_GlobalContext;
 #ifdef Q_OS_WIN
 	// See the corresponding note in RWriteConsoleEx(). For auto-detecting UTF8 markers in console output.
 	win_do_detect_winutf8markers = true;
diff --git a/rkward/rbackend/rkreventloop.cpp b/rkward/rbackend/rkreventloop.cpp
index 97fd6115a..73319103c 100644
--- a/rkward/rbackend/rkreventloop.cpp
+++ b/rkward/rbackend/rkreventloop.cpp
@@ -25,8 +25,8 @@ static void processX11EventsWorker (void *) {
 #ifndef Q_OS_WIN
 	for (;;) {
 		fd_set *what;
-		what = RFn::R_checkActivity(ROb(R_wait_usec) > 0 ? ROb(R_wait_usec) : 50, 1);
-		RFn::R_runHandlers(ROb(R_InputHandlers), what);
+		what = R_checkActivity(R_wait_usec > 0 ? R_wait_usec : 50, 1);
+		R_runHandlers(R_InputHandlers, what);
 		if (!what) break;
 	}
 	/* This seems to be needed to make Rcmdr react to events. Has this always been the case? It was commented out for a long time, without anybody noticing. */


More information about the rkward-tracker mailing list