[rkward-cvs] SF.net SVN: rkward:[4307] trunk/rkward/rkward
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Tue Sep 25 10:38:10 UTC 2012
Revision: 4307
http://rkward.svn.sourceforge.net/rkward/?rev=4307&view=rev
Author: tfry
Date: 2012-09-25 10:38:10 +0000 (Tue, 25 Sep 2012)
Log Message:
-----------
Fix printing of full object name for data objects in R >= 2.14.0.
E.g. datasets::women was printed as as.environment ("datasets")$women withouth this.
Modified Paths:
--------------
trunk/rkward/rkward/core/renvironmentobject.cpp
trunk/rkward/rkward/rbackend/rkstructuregetter.cpp
Modified: trunk/rkward/rkward/core/renvironmentobject.cpp
===================================================================
--- trunk/rkward/rkward/core/renvironmentobject.cpp 2012-09-25 10:28:13 UTC (rev 4306)
+++ trunk/rkward/rkward/core/renvironmentobject.cpp 2012-09-25 10:38:10 UTC (rev 4307)
@@ -79,6 +79,7 @@
if (type & ToplevelEnv) {
/* Some items are placed outside of their native namespace. E.g. in package:boot item "motor". It can be retrieved using as.environment ("package:boot")$motor. This is extremly ugly. We need to give them (and only them) this special treatment. */
// TODO: hopefully one day operator "::" will work even in those cases. So check back later, and remove after a sufficient amount of backwards compatibility time
+// NOTE: This appears to have been fixed in R 2.14.0, when all packages were forced to have namespaces.
if ((type & PackageEnv) && (!misplaced)) return (packageName () + "::" + safe_name);
return (getFullName () + '$' + safe_name);
}
Modified: trunk/rkward/rkward/rbackend/rkstructuregetter.cpp
===================================================================
--- trunk/rkward/rkward/rbackend/rkstructuregetter.cpp 2012-09-25 10:28:13 UTC (rev 4306)
+++ trunk/rkward/rkward/rbackend/rkstructuregetter.cpp 2012-09-25 10:38:10 UTC (rev 4307)
@@ -19,6 +19,7 @@
#include "rdata.h"
#include "rkrsupport.h"
+#include "rkrbackend.h"
#include "rkrbackendprotocol_shared.h"
#include "../core/robject.h"
@@ -367,7 +368,7 @@
PROTECT (child);
bool child_misplaced = false;
- if (at_toplevel && with_namespace) {
+ if (at_toplevel && with_namespace && (!RKRBackend::this_pointer->RRuntimeIsVersion (2, 14, 0))) {
if (!Rf_isNull (namespace_envir)) {
SEXP dummy = Rf_findVarInFrame (namespace_envir, current_childname);
if (Rf_isNull (dummy) || (dummy == R_UnboundValue)) child_misplaced = true;
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