[rkward-cvs] SF.net SVN: rkward:[2411] branches/release_branch_0.4.9
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Wed Mar 25 12:50:44 UTC 2009
Revision: 2411
http://rkward.svn.sourceforge.net/rkward/?rev=2411&view=rev
Author: tfry
Date: 2009-03-25 12:50:44 +0000 (Wed, 25 Mar 2009)
Log Message:
-----------
Backport 2410 from trunk (untested)
Modified Paths:
--------------
branches/release_branch_0.4.9/rkward/rbackend/rembedinternal.cpp
Property Changed:
----------------
branches/release_branch_0.4.9/
Property changes on: branches/release_branch_0.4.9
___________________________________________________________________
Added: svn:mergeinfo
+ /trunk/rkward:2410
Modified: branches/release_branch_0.4.9/rkward/rbackend/rembedinternal.cpp
===================================================================
--- branches/release_branch_0.4.9/rkward/rbackend/rembedinternal.cpp 2009-03-25 12:46:18 UTC (rev 2410)
+++ branches/release_branch_0.4.9/rkward/rbackend/rembedinternal.cpp 2009-03-25 12:50:44 UTC (rev 2411)
@@ -64,6 +64,10 @@
#define R_2_7
#endif
+#if (R_VERSION > R_Version(2, 8, 9))
+#define R_2_9
+#endif
+
extern "C" {
#define R_INTERFACE_PTRS 1
@@ -502,7 +506,11 @@
QString *list = new QString[*count];
unsigned int i = 0;
for (; i < *count; ++i) {
+#ifdef R_2_9
+ SEXP dummy = STRING_ELT (from_exp, i);
+#else
SEXP dummy = VECTOR_ELT (from_exp, i);
+#endif
if (TYPEOF (dummy) != CHARSXP) {
list[i] = QString ("not defined"); // can this ever happen?
@@ -776,7 +784,11 @@
const char *command = localc;
PROTECT(cv=allocVector(STRSXP, 1));
- SET_VECTOR_ELT(cv, 0, mkChar(command));
+#ifdef R_2_9
+ SET_STRING_ELT(cv, 0, mkChar(command));
+#else
+ SET_VECTOR_ELT(cv, 0, mkChar(command));
+#endif
// TODO: Maybe we can use R_ParseGeneral instead. Then we could find the exact character, where parsing fails. Nope: not exported API
#ifdef R_2_5
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list