[education/rkward/releases/0.8.3] rkward/rbackend: Yet another compilaiton fix

Thomas Friedrichsmeier null at kde.org
Fri Apr 17 17:47:56 BST 2026


Git commit 6cbb676972fcab70a8751e64a9c684e2fa70fb85 by Thomas Friedrichsmeier.
Committed on 17/04/2026 at 16:47.
Pushed by tfry into branch 'releases/0.8.3'.

Yet another compilaiton fix

M  +2    -2    rkward/rbackend/rkstructuregetter.cpp

https://invent.kde.org/education/rkward/-/commit/6cbb676972fcab70a8751e64a9c684e2fa70fb85

diff --git a/rkward/rbackend/rkstructuregetter.cpp b/rkward/rbackend/rkstructuregetter.cpp
index cfb0e99b7..8951a725d 100644
--- a/rkward/rbackend/rkstructuregetter.cpp
+++ b/rkward/rbackend/rkstructuregetter.cpp
@@ -134,10 +134,10 @@ void RKStructureGetter::getStructureSafe(SEXP value, const QString &name, int ad
 SEXP RKStructureGetter::peekFromEnv(SEXP sym, SEXP env) {
 	RK_TRACE(RBACKEND);
 
+#if R_VERSION >= R_Version(4, 6, 0)
 	if (keep_evalled_promises) {
 		return RFn::R_getVar(sym, env, /* inherits: */ FALSE);
 	}
-#if R_VERSION >= R_Version(4, 6, 0)
 	if (RFn::R_GetBindingType) { // implies R runtime >= 4.6
 		const auto type = RFn::R_GetBindingType(sym, env);
 		if (type == R_BindingTypeDelayed) {
@@ -151,7 +151,7 @@ SEXP RKStructureGetter::peekFromEnv(SEXP sym, SEXP env) {
 		return RFn::R_getVar(sym, env, /* inherits: */ FALSE);
 	}
 #endif
-	if (!RFn::PRCODE) {
+	if (keep_evalled_promises || !RFn::PRCODE) {
 		// We have neither the new nor the old promise handling functions?
 		// fall back to forcing
 		return RFn::Rf_eval(sym, env); // R_getVar() may not be available, either


More information about the rkward-tracker mailing list