[Pomp-commits] r1095 - pkg/pomp/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Feb 26 10:42:53 CET 2015


Author: kingaa
Date: 2015-02-26 10:42:53 +0100 (Thu, 26 Feb 2015)
New Revision: 1095

Modified:
   pkg/pomp/R/builder.R
Log:
- correction with (verbose=TRUE) messages

Modified: pkg/pomp/R/builder.R
===================================================================
--- pkg/pomp/R/builder.R	2015-02-26 09:42:50 UTC (rev 1094)
+++ pkg/pomp/R/builder.R	2015-02-26 09:42:53 UTC (rev 1095)
@@ -79,8 +79,10 @@
 
 pompLoad.internal <- function (object, ..., verbose = getOption("verbose",FALSE)) {
   for (lib in object at solibfile) {
-    if (!is.loaded("__pomp_load_stack_incr",PACKAGE=lib[1])) dyn.load(lib[2])
-    if (verbose) cat("loading",sQuote(lib[2]),"\n")
+    if (!is.loaded("__pomp_load_stack_incr",PACKAGE=lib[1])) {
+      dyn.load(lib[2])
+      if (verbose) cat("loading",sQuote(lib[2]),"\n")
+    }
     .C("__pomp_load_stack_incr",PACKAGE=lib[1])
   }
   invisible(NULL)
@@ -91,8 +93,10 @@
     if (is.loaded("__pomp_load_stack_decr",PACKAGE=lib[1])) {
       st <- .C("__pomp_load_stack_decr",st=integer(1),PACKAGE=lib[1])$st
       stopifnot(st>=0)
-      if (st==0) dyn.unload(lib[2])
-      if (verbose) cat("unloading",sQuote(lib[2]),"\n")
+      if (st==0) {
+        dyn.unload(lib[2])
+        if (verbose) cat("unloading",sQuote(lib[2]),"\n")
+      }
     }
   }
   invisible(NULL)



More information about the pomp-commits mailing list