[Pomp-commits] r110 - pkg/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Apr 28 13:52:25 CEST 2009


Author: kingaa
Date: 2009-04-28 13:52:25 +0200 (Tue, 28 Apr 2009)
New Revision: 110

Modified:
   pkg/src/dprocess.c
   pkg/src/rprocess.c
Log:
explicitly cast 'times' to double to avoid potential problems when R casts a sequence to integer storage type

Modified: pkg/src/dprocess.c
===================================================================
--- pkg/src/dprocess.c	2009-04-28 11:37:16 UTC (rev 109)
+++ pkg/src/dprocess.c	2009-04-28 11:52:25 UTC (rev 110)
@@ -56,7 +56,7 @@
   SET_TAG(fcall,install("log"));
   PROTECT(fcall = LCONS(params,fcall)); nprotect++;
   SET_TAG(fcall,install("params"));
-  PROTECT(fcall = LCONS(times,fcall)); nprotect++;
+  PROTECT(fcall = LCONS(AS_NUMERIC(times),fcall)); nprotect++;
   SET_TAG(fcall,install("times"));
   PROTECT(fcall = LCONS(x,fcall)); nprotect++;
   SET_TAG(fcall,install("x"));

Modified: pkg/src/rprocess.c
===================================================================
--- pkg/src/rprocess.c	2009-04-28 11:37:16 UTC (rev 109)
+++ pkg/src/rprocess.c	2009-04-28 11:52:25 UTC (rev 110)
@@ -50,7 +50,7 @@
   SET_TAG(fcall,install("tcovar"));
   PROTECT(fcall = LCONS(params,fcall)); nprotect++;
   SET_TAG(fcall,install("params"));
-  PROTECT(fcall = LCONS(times,fcall)); nprotect++;
+  PROTECT(fcall = LCONS(AS_NUMERIC(times),fcall)); nprotect++;
   SET_TAG(fcall,install("times"));
   PROTECT(fcall = LCONS(xstart,fcall)); nprotect++;
   SET_TAG(fcall,install("xstart"));



More information about the pomp-commits mailing list