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

Thomas Friedrichsmeier null at kde.org
Sat May 4 21:45:32 BST 2024


Git commit ded0472b90c398adc05a7fed1b6446417789ba58 by Thomas Friedrichsmeier.
Committed on 04/05/2024 at 20:45.
Pushed by tfry into branch 'kf5'.

Fix compilation

M  +4    -4    rkward/rbackend/rkrbackend.cpp

https://invent.kde.org/education/rkward/-/commit/ded0472b90c398adc05a7fed1b6446417789ba58

diff --git a/rkward/rbackend/rkrbackend.cpp b/rkward/rbackend/rkrbackend.cpp
index 3166aa6ec..ed570ba9a 100644
--- a/rkward/rbackend/rkrbackend.cpp
+++ b/rkward/rbackend/rkrbackend.cpp
@@ -944,8 +944,8 @@ SEXP doSubstackCall (SEXP _call, SEXP _args) {
 
 	// For now, for simplicity, assume args are always strings, although possibly nested in lists
 	auto ret = RKRBackend::this_pointer->handleRequestWithSubcommands(call, RKRSupport::SEXPToNestedStrings(_args));
-	if (!ret.warning.isEmpty()) Rf_warning("%s", RKRBackend::fromUtf8(ret.warning));  // print warnings, first, as errors will cause a stop
-	if (!ret.error.isEmpty()) Rf_error("%s", RKRBackend::fromUtf8(ret.error));
+	if (!ret.warning.isEmpty()) Rf_warning("%s", RKRBackend::fromUtf8(ret.warning).constData());  // print warnings, first, as errors will cause a stop
+	if (!ret.error.isEmpty()) Rf_error("%s", RKRBackend::fromUtf8(ret.error).constData());
 
 	return RKRSupport::QVariantToSEXP(ret.ret);
 }
@@ -956,8 +956,8 @@ SEXP doPlainGenericRequest (SEXP call, SEXP synchronous) {
 	R_CheckUserInterrupt ();
 
 	auto ret = RKRBackend::this_pointer->handlePlainGenericRequest(RKRSupport::SEXPToStringList(call), RKRSupport::SEXPToInt(synchronous));
-	if (!ret.warning.isEmpty()) Rf_warning("%s", RKRBackend::fromUtf8(ret.warning));  // print warnings, first, as errors will cause a stop
-	if (!ret.error.isEmpty()) Rf_error("%s", RKRBackend::fromUtf8(ret.error));
+	if (!ret.warning.isEmpty()) Rf_warning("%s", RKRBackend::fromUtf8(ret.warning).constData());  // print warnings, first, as errors will cause a stop
+	if (!ret.error.isEmpty()) Rf_error("%s", RKRBackend::fromUtf8(ret.error).constData());
 
 	return RKRSupport::QVariantToSEXP(ret.ret);
 }


More information about the rkward-tracker mailing list