Hi!

On Tuesday 29 April 2014 20:05:19 m-...@users.sf.net wrote:
> MacPorts: the rkward-devel portfile now builds fine, but stable rkward
> (bound to rev 4635) doesn't:

[...]

> move ahead to 0.6.2?

I think the fastest (and therefore preferrable) fix will be to add the 
relevant patch to the portfile. Patch attached (combination of r4654, r4657, 
and r4660).

As written in PM, you are probably right that we should release 0.6.2 rather 
soonish, even if that means releasing with some unfinished features (as long 
as those are not yet in use, they should not get in the way, either). But at 
the very least, we'd need the usual testing periods. So I suggest to set the 
priorities in this order:

1) Get the portfiles done.
2) Figure out what's the problem on Maverick, and fix that (may or may not be 
fixable with yet another source patch).
3) Get ready for 0.6.2.

Regards
Thomas
Index: rkward/rbackend/rkstructuregetter.cpp
===================================================================
--- rkward/rbackend/rkstructuregetter.cpp	(revision 4653)
+++ rkward/rbackend/rkstructuregetter.cpp	(revision 4660)
@@ -193,22 +193,33 @@
 
 	// get classes
 	SEXP classes_s;
+	QStringList classes;
 
 	if ((TYPEOF (value) == LANGSXP) || (TYPEOF (value) == SYMSXP)) {	// if it's a call, we should NEVER send it through eval
-		extern SEXP R_data_class (SEXP, Rboolean);
-		classes_s = R_data_class (value, (Rboolean) 0);
+		// stripped down and adjusted from R_data_class
+		PROTECT (classes_s = Rf_getAttrib (value, R_ClassSymbol));
+		if (Rf_length (classes_s)) classes = RKRSupport::SEXPToStringList(classes_s);
+		UNPROTECT (1);
+		if (classes.isEmpty ()) {
+			if (TYPEOF (value) == LANGSXP) {
+				SEXP symb = PROTECT (CAR (value));
+				QString cl;
+				if (TYPEOF (symb) == SYMSXP) cl = CHAR (PRINTNAME (symb));
+				UNPROTECT (1);
+				if ((cl != "if") && (cl != "while") && (cl != "for") && (cl != "=") && (cl != "<-") && (cl != "(") && (cl != "{")) cl = "call";
+				classes = QStringList (cl);
+			} else {
+				classes = QStringList ("name");
+			}
+		}
 
 		REPROTECT (value = Rf_coerceVector (value, EXPRSXP), value_index);	// make sure the object is safe for everything to come
-
-		PROTECT (classes_s);
 	} else {
-		classes_s = RKRSupport::callSimpleFun (class_fun, value, baseenv);
-		PROTECT (classes_s);
+		PROTECT (classes_s = RKRSupport::callSimpleFun (class_fun, value, baseenv));
+		classes = RKRSupport::SEXPToStringList (classes_s);
+		UNPROTECT (1);
 	}
 
-	QStringList classes = RKRSupport::SEXPToStringList (classes_s);
-	UNPROTECT (1);	/* classes_s */
-
 	// store classes
 	RData *classdata = new RData;
 	classdata->setData (classes);

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
RKWard-devel mailing list
RKWard-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rkward-devel

Reply via email to