[rkward-cvs] SF.net SVN: rkward: [1828] trunk/rkward/rkward/rbackend
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Wed Apr 18 19:18:18 UTC 2007
Revision: 1828
http://svn.sourceforge.net/rkward/?rev=1828&view=rev
Author: tfry
Date: 2007-04-18 12:18:17 -0700 (Wed, 18 Apr 2007)
Log Message:
-----------
Corrections for detecting whether a var is misplaced
Modified Paths:
--------------
trunk/rkward/rkward/rbackend/rkstructuregetter.cpp
trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R
Modified: trunk/rkward/rkward/rbackend/rkstructuregetter.cpp
===================================================================
--- trunk/rkward/rkward/rbackend/rkstructuregetter.cpp 2007-04-18 18:41:39 UTC (rev 1827)
+++ trunk/rkward/rkward/rbackend/rkstructuregetter.cpp 2007-04-18 19:18:17 UTC (rev 1828)
@@ -146,7 +146,7 @@
GetStructureWorkerArgs args;
args.toplevel = value;
args.name = name;
- args.misplaced = false;
+ args.misplaced = misplaced;
args.storage = storage;
args.getter = this;
@@ -400,14 +400,14 @@
if (Rf_isNull (namespace_envir)) {
child_misplaced = true;
} else {
- SEXP dummy = Rf_findVar (current_childname, namespace_envir);
- if (Rf_isNull (dummy)) child_misplaced = true;
+ SEXP dummy = Rf_findVarInFrame (namespace_envir, current_childname);
+ if (Rf_isNull (dummy) || (dummy == R_UnboundValue)) child_misplaced = true;
}
/* for R 2.4.0 or greater: operator "::" works if package has no namespace at all, or has a namespace with the symbol in it */
# else
if (!Rf_isNull (namespace_envir)) {
- SEXP dummy = Rf_findVar (current_childname, namespace_envir);
- if (Rf_isNull (dummy)) child_misplaced = true;
+ SEXP dummy = Rf_findVarInFrame (namespace_envir, current_childname);
+ if (Rf_isNull (dummy) || (dummy == R_UnboundValue)) child_misplaced = true;
}
# endif
}
Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R 2007-04-18 18:41:39 UTC (rev 1827)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R 2007-04-18 19:18:17 UTC (rev 1828)
@@ -339,11 +339,11 @@
}
".rk.get.structure.new" <- function (x, name, envlevel=0, namespacename=NULL) {
- .Call ("rk.get.structure", x, as.character (name), as.integer (envlevel), as.character (namespacename))
+ .Call ("rk.get.structure", x, as.character (name), as.integer (envlevel), namespacename)
}
".rk.try.get.namespace" <- function (name) {
- tryCatch (asNamespace (namespacename), error = function(e) NULL)
+ tryCatch (asNamespace (name), error = function(e) NULL)
}
".rk.get.structure" <- .rk.get.structure.new
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