Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add function for accessing namespace registry

  • Loading branch information...
commit 1ad1ef1f8b0d3ccbdd4292d368cd585258247e51 1 parent 77011a6
@wch wch authored
Showing with 14 additions and 0 deletions.
  1. +1 −0  NAMESPACE
  2. +7 −0 R/namespace-env.r
  3. +6 −0 src/devtools.c
View
1  NAMESPACE
@@ -91,3 +91,4 @@ importFrom(tools,package_dependencies)
importFrom(tools,parse_Rd)
importFrom(utils,install.packages)
importFrom(whisker,whisker.render)
+useDynLib(devtools,nsreg)
View
7 R/namespace-env.r
@@ -139,3 +139,10 @@ is_loaded <- function(pkg = ".") {
pkg <- as.package(pkg)
pkg$package %in% loadedNamespaces()
}
+
+
+# Returns the namespace registry
+#' @useDynLib devtools nsreg
+ns_registry <- function() {
+ .Call(nsreg)
+}
View
6 src/devtools.c
@@ -0,0 +1,6 @@
+#include <R.h>
+#include <Rdefines.h>
+
+SEXP nsreg() {
+ return R_NamespaceRegistry;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.