[Pomp-commits] r1096 - in pkg/pomp: R src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Feb 26 10:42:56 CET 2015
Author: kingaa
Date: 2015-02-26 10:42:56 +0100 (Thu, 26 Feb 2015)
New Revision: 1096
Modified:
pkg/pomp/R/builder.R
pkg/pomp/src/pomp_fun.c
Log:
- put load-stack stuff at bottom of temporary C file
- streamline pomp_fun.c
Modified: pkg/pomp/R/builder.R
===================================================================
--- pkg/pomp/R/builder.R 2015-02-26 09:42:53 UTC (rev 1095)
+++ pkg/pomp/R/builder.R 2015-02-26 09:42:56 UTC (rev 1096)
@@ -237,8 +237,6 @@
cat(file=out,render(header$file,name=name,pompheader=pompheader))
- cat(file=out,header$stackhandling)
-
for (f in utility.fns) {
cat(file=out,f)
}
@@ -324,6 +322,9 @@
for (v in seq_along(paramnames)) {
cat(file=out,render(undefine$var,variable=paste0("T",paramnames[v])))
}
+
+ cat(file=out,header$stackhandling)
+
close(out)
cflags <- paste0("PKG_CFLAGS=\"",
Modified: pkg/pomp/src/pomp_fun.c
===================================================================
--- pkg/pomp/src/pomp_fun.c 2015-02-26 09:42:53 UTC (rev 1095)
+++ pkg/pomp/src/pomp_fun.c 2015-02-26 09:42:56 UTC (rev 1096)
@@ -25,8 +25,7 @@
PROTECT(nf = GET_SLOT(pfun,install("native.fun"))); nprotect++;
PROTECT(pack = GET_SLOT(pfun,install("PACKAGE"))); nprotect++;
if (LENGTH(pack) < 1) {
- PROTECT(pack = NEW_CHARACTER(1)); nprotect++;
- SET_STRING_ELT(pack,0,mkChar(""));
+ PROTECT(pack = mkString("")); nprotect++;
}
PROTECT(nsi = eval(lang3(install("getNativeSymbolInfo"),nf,pack),R_BaseEnv)); nprotect++;
PROTECT(f = getListElement(nsi,"address")); nprotect++;
More information about the pomp-commits
mailing list