tag 475494 + patch
thanks

I am attaching a patch that fixes R27 wrapper code generation for me,
I've opened an upstream bugreport and attached it there too:

http://sourceforge.net/tracker/index.php?func=detail&aid=1942837&group_id=1645&atid=301645
Index: Lib/r/rrun.swg
===================================================================
--- Lib/r/rrun.swg	(revision 10375)
+++ Lib/r/rrun.swg	(working copy)
@@ -18,12 +18,19 @@
 
 #define SWIGR 1
 
-#if R_VERSION >= R_Version(2,6,0)
+#if R_VERSION >= R_Version(2,7,0)
 #define VMAXTYPE void *
+#define RVERSION27(x) x
+#define RVERSION26(x)
+#define RVERSIONPRE26(x) 
+#elif R_VERSION >= R_Version(2,6,0)
+#define VMAXTYPE void *
+#define RVERSION27(x)
 #define RVERSION26(x) x
 #define RVERSIONPRE26(x) 
 #else
 #define VMAXTYPE char *
+#define RVERSION27(x)
 #define RVERSION26(x)
 #define RVERSIONPRE26(x) x
 #endif
Index: Lib/r/rfragments.swg
===================================================================
--- Lib/r/rfragments.swg	(revision 10375)
+++ Lib/r/rfragments.swg	(working copy)
@@ -164,6 +164,7 @@
 {
   SEXP t, c;
   if (!carray) return R_NilValue;
+  RVERSION27(return Rf_mkCharLen(carray, size));
   RVERSION26(return Rf_mkCharEnc(carray, size));
   RVERSIONPRE26(
   Rf_protect(t = Rf_allocVector(STRSXP, 1));

Reply via email to