[rkward] rkward/rbackend: Fix compilation with upcoming R 3.3.x.

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Sun Mar 6 21:42:10 UTC 2016


Git commit 3152e5ec006bc09ea0b23386f9faacbfddf8e184 by Thomas Friedrichsmeier.
Committed on 06/03/2016 at 21:41.
Pushed by tfry into branch 'master'.

Fix compilation with upcoming R 3.3.x.

Mostly removing extern "C".

M  +2    -3    rkward/rbackend/rkrbackend.cpp
M  +1    -3    rkward/rbackend/rkrbackend.h
M  +1    -1    rkward/rbackend/rkrbackendprotocol_backend.cpp
M  +1    -1    rkward/rbackend/rkreventloop.cpp
M  +0    -3    rkward/rbackend/rkstructuregetter.cpp
M  +0    -2    rkward/rbackend/rkwarddevice/rkgraphicsdevice_setup.cpp
M  +0    -2    rkward/rbackend/rkwarddevice/rkgraphicsdevice_stubs.cpp

http://commits.kde.org/rkward/3152e5ec006bc09ea0b23386f9faacbfddf8e184

diff --git a/rkward/rbackend/rkrbackend.cpp b/rkward/rbackend/rkrbackend.cpp
index cac7bb9..2de0a2e 100644
--- a/rkward/rbackend/rkrbackend.cpp
+++ b/rkward/rbackend/rkrbackend.cpp
@@ -55,7 +55,6 @@ void* RKRBackend::default_global_context = 0;
 #include <stdint.h>
 #include <locale.h>
 
-extern "C" {
 #define R_INTERFACE_PTRS 1
 // for R_CStackStart/Limit
 #define CSTACK_DEFNS 1
@@ -179,9 +178,9 @@ void RKRBackend::clearPendingInterrupt () {
 #if R_VERSION < R_Version(2,13,0)
 LibExtern void Rf_PrintWarnings (void);
 #endif
-LibExtern void run_Rmainloop (void);
+extern "C" void run_Rmainloop (void);
 #include <R_ext/eventloop.h>
-}
+
 
 #include "rdata.h"
 
diff --git a/rkward/rbackend/rkrbackend.h b/rkward/rbackend/rkrbackend.h
index 4519963..96d5cf1 100644
--- a/rkward/rbackend/rkrbackend.h
+++ b/rkward/rbackend/rkrbackend.h
@@ -31,9 +31,7 @@
 #include "rkrbackendprotocol_backend.h"
 
 #ifdef Q_WS_WIN
-extern "C" {
-	void RK_scheduleIntr();
-}
+void RK_scheduleIntr();
 #endif
 
 class QStringList;
diff --git a/rkward/rbackend/rkrbackendprotocol_backend.cpp b/rkward/rbackend/rkrbackendprotocol_backend.cpp
index 311954b..8ab3232 100644
--- a/rkward/rbackend/rkrbackendprotocol_backend.cpp
+++ b/rkward/rbackend/rkrbackendprotocol_backend.cpp
@@ -34,7 +34,7 @@
 #include <QTemporaryFile>
 #include <QDir>
 
-	extern "C" void RK_setupGettext (const char*);
+	void RK_setupGettext (const char*);
 	int RK_Debug_Level = 2;
 	int RK_Debug_Flags = DEBUG_ALL;
 	QMutex RK_Debug_Mutex;
diff --git a/rkward/rbackend/rkreventloop.cpp b/rkward/rbackend/rkreventloop.cpp
index 58df030..fd976cc 100644
--- a/rkward/rbackend/rkreventloop.cpp
+++ b/rkward/rbackend/rkreventloop.cpp
@@ -28,7 +28,7 @@
 
 #include "../debug.h"
 
-extern "C" void RK_doIntr ();
+void RK_doIntr ();
 
 static void processX11EventsWorker (void *) {
 // this basically copied from R's unix/sys-std.c (Rstd_ReadConsole)
diff --git a/rkward/rbackend/rkstructuregetter.cpp b/rkward/rbackend/rkstructuregetter.cpp
index 8050270..f2502ab 100644
--- a/rkward/rbackend/rkstructuregetter.cpp
+++ b/rkward/rbackend/rkstructuregetter.cpp
@@ -163,7 +163,6 @@ SEXP RKStructureGetter::resolvePromise (SEXP from) {
 	return ret;
 }
 
-extern "C" {
 // TODO: split out some of the large blocks into helper functions, to make this easier to read
 void RKStructureGetter::getStructureWorker (SEXP val, const QString &name, int add_type_flags, RData *storage, int nesting_depth) {
 	RK_TRACE (RBACKEND);
@@ -478,5 +477,3 @@ void RKStructureGetter::getStructureWorker (SEXP val, const QString &name, int a
 	RK_ASSERT (!res.contains (0));
 	storage->setData (res);
 }
-
-}	/* extern "C" */
diff --git a/rkward/rbackend/rkwarddevice/rkgraphicsdevice_setup.cpp b/rkward/rbackend/rkwarddevice/rkgraphicsdevice_setup.cpp
index 90a3a40..1c0779b 100644
--- a/rkward/rbackend/rkwarddevice/rkgraphicsdevice_setup.cpp
+++ b/rkward/rbackend/rkwarddevice/rkgraphicsdevice_setup.cpp
@@ -33,10 +33,8 @@
 #endif
 #define R_USE_PROTOTPYES 1
 
-extern "C" {
 #include <R_ext/GraphicsEngine.h>
 #include <Rversion.h>
-}
 
 // rcolor typedef added in R 3.0.0
 #ifndef rcolor
diff --git a/rkward/rbackend/rkwarddevice/rkgraphicsdevice_stubs.cpp b/rkward/rbackend/rkwarddevice/rkgraphicsdevice_stubs.cpp
index c6c619a..3494435 100644
--- a/rkward/rbackend/rkwarddevice/rkgraphicsdevice_stubs.cpp
+++ b/rkward/rbackend/rkwarddevice/rkgraphicsdevice_stubs.cpp
@@ -25,9 +25,7 @@
 #include "../rkreventloop.h"
 #include "../../debug.h"
 
-extern "C" {
 #include <R_ext/GraphicsEngine.h>
-}
 
 #define RKD_IN_STREAM RKGraphicsDeviceBackendTransmitter::streamer.instream
 #define RKD_OUT_STREAM RKGraphicsDeviceBackendTransmitter::streamer.outstream



More information about the rkward-tracker mailing list