[Rprotobuf-commits] r453 - in pkg: . R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue May 15 21:44:24 CEST 2012


Author: edd
Date: 2012-05-15 21:44:24 +0200 (Tue, 15 May 2012)
New Revision: 453

Modified:
   pkg/ChangeLog
   pkg/R/internals.R
   pkg/R/zzz.R
   pkg/man/readProtoFiles.Rd
Log:
pass lib.lib from zzz.R to readProtoFiles


Modified: pkg/ChangeLog
===================================================================
--- pkg/ChangeLog	2012-05-15 18:43:43 UTC (rev 452)
+++ pkg/ChangeLog	2012-05-15 19:44:24 UTC (rev 453)
@@ -2,6 +2,10 @@
 
  	* DESCRIPTION: Release 0.2.4
 
+	* R/zzz.R (.onLoad): pass lib.loc=libname to readProtoFiles
+	* R/internals.R (readProtoFiles): use lib.loc argument
+	* man/readProtoFiles.Rd: Document new lib.loc argument
+
 2012-05-14  Dirk Eddelbuettel  <edd at debian.org>
 
 	* R/lookup.R: comment-out unlockBinding() which R CMD check does not

Modified: pkg/R/internals.R
===================================================================
--- pkg/R/internals.R	2012-05-15 18:43:43 UTC (rev 452)
+++ pkg/R/internals.R	2012-05-15 19:44:24 UTC (rev 453)
@@ -9,11 +9,11 @@
 #' @param package if specified, proto files are imported from the "proto" directory
 #'                of the package
 #' @return invisible(NULL)
-readProtoFiles <- function(
-	files,
-	dir,
-	package = "RProtoBuf",
-	pattern = "\\.proto$"
+readProtoFiles <- function(files,
+                           dir,
+                           package = "RProtoBuf",
+                           pattern = "\\.proto$",
+                           lib.loc = NULL
 	){
 
 	if( missing( files ) ){
@@ -21,7 +21,7 @@
 			if( missing(package) ){
 				dir <- getwd()
 			} else {
-				dir <- system.file( "proto", package = package )
+				dir <- system.file( "proto", package = package, lib.loc = lib.loc )
 				if( !file.exists( dir ) ){
 					stop( sprintf("package '%s' does not have a 'proto' directory", package) )
 				}

Modified: pkg/R/zzz.R
===================================================================
--- pkg/R/zzz.R	2012-05-15 18:43:43 UTC (rev 452)
+++ pkg/R/zzz.R	2012-05-15 19:44:24 UTC (rev 453)
@@ -3,7 +3,7 @@
     minversion <- packageDescription(pkgname, lib.loc=libname)$MinimumLibProtoVersion
     minversion <- as.integer( gsub( "[[:space:]]+", "", minversion ) )
     .Call( "check_libprotobuf_version", minversion, PACKAGE = "RProtoBuf" )
-    readProtoFiles( package = pkgname )
+    readProtoFiles( package=pkgname, lib.loc=libname )
     attachDescriptorPool( pos = length(search()) )
 
     if( exists( ".httpd.handlers.env", asNamespace( "tools" ) ) ){

Modified: pkg/man/readProtoFiles.Rd
===================================================================
--- pkg/man/readProtoFiles.Rd	2012-05-15 18:43:43 UTC (rev 452)
+++ pkg/man/readProtoFiles.Rd	2012-05-15 19:44:24 UTC (rev 453)
@@ -9,7 +9,7 @@
 message type names.
 }
 \usage{
-readProtoFiles(files, dir, package = "RProtoBuf", pattern = "\\\\.proto$")
+readProtoFiles(files, dir, package="RProtoBuf", pattern="\\\\.proto$", lib.loc=NULL)
 }
 \arguments{
   \item{files}{Proto files}
@@ -20,6 +20,7 @@
   missing, "proto" files in the "proto" directory of the 
   package tree are imported.}
   \item{pattern}{A filename pattern to match proto files.}
+  \item{lib.loc}{Library location.}
 }
 \value{
 \code{NULL}, invisibly. 



More information about the Rprotobuf-commits mailing list