From 658f135d231b8664f4022339720ccc4443864b8e Mon Sep 17 00:00:00 2001 From: 2005m Date: Thu, 6 Jun 2024 18:50:58 +0100 Subject: [PATCH] Fix test for R-dev --- DESCRIPTION | 4 ++-- MD5 | 10 +++++----- R/call.R | 2 +- inst/NEWS.Rd | 8 ++++++++ src/iif.c | 2 +- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 4cdcc43..e861de6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: kit Type: Package Title: Data Manipulation Functions Implemented in C -Version: 0.0.17 -Date: 2024-05-03 +Version: 0.0.18 +Date: 2024-06-06 Authors@R: c(person("Morgan", "Jacob", role = c("aut", "cre", "cph"), email = "morgan.emailbox@gmail.com"), person("Sebastian", "Krantz", role = "ctb")) Author: Morgan Jacob [aut, cre, cph], Sebastian Krantz [ctb] diff --git a/MD5 b/MD5 index 7665be6..9c00d34 100644 --- a/MD5 +++ b/MD5 @@ -1,7 +1,7 @@ 6071edd604dbeb75308cfbedc7790398 *cleanup d2761d00effd7b096a5bea21bc38742e *configure -19158cf849aa973c876999d7c349e5f6 *DESCRIPTION -579d6713a55c0d47166988596a7defe5 *inst/NEWS.Rd +b3e2183a8c074fd4a4257c00e36b615a *DESCRIPTION +1663021b062fc51d7db2efe337e3c735 *inst/NEWS.Rd a87b0f223435ed35607e8514562b8bfe *LICENSE 2ddfa8d8739668eedda260e6ddc935d4 *man/charToFact.Rd 8f19a2c9feb2f352580fd4892650f285 *man/count.Rd @@ -16,12 +16,12 @@ a137f7855b41b074e2babaf8a1562551 *man/shareData.Rd 54f91d543a10f8c9aef7082da2b86de7 *man/topn.Rd a7f31cee15b9624dab8f4d13d3c66bad *man/vswitch.Rd c797ca387dccc02751cfe85108fb0159 *NAMESPACE -1eb8bec6ee346933bfbff2acda381402 *R/call.R +afdd17df63f1a06c519bea52c696c04e *R/call.R 2d6c06dfc570d456af125c160cf150d7 *README.md f8a685dd117b590adaae0c0c6dfb8de2 *src/dup.c e89fa490ca241429f9f7adbea3b931de *src/dupLen.c 5eaee76c99ff42679577592ae9c5a29f *src/fpos.c -2a47a4eb3de647b3d2e21775c95ede42 *src/iif.c +835f517eb81445beeb99fd24c046c6de *src/iif.c 6d91dc90d2db4ede5f044b824d4f34a3 *src/init.c b929f70ab892f155eeead08c160ffc25 *src/kit.h a52426250b954a335b1121948e057ee7 *src/Makevars.in @@ -32,6 +32,6 @@ b13fc207b052914c3d078eb5759cecce *src/nswitch.c 2c6e521b15f59e489cf31a53c1530b60 *src/share.c ef9329d7e748c13b9526fca1788a1891 *src/topn.c 2cde70cd4cbf783f0b01a9dd70c01ac9 *src/utils.c -746bdc5ecf3683dbdf4bb740e593c9f7 *src/vswitch.c +719ad7753149642df0dd7c0c38c57e28 *src/vswitch.c 6af1b66c0c90f6809c960e2133c1b5e4 *tests/test_kit.R 0dce9bd953fe40b1c8fae3d01a597e7c *tests/test_kit.Rout.save diff --git a/R/call.R b/R/call.R index de7ca89..aa17fc7 100644 --- a/R/call.R +++ b/R/call.R @@ -33,7 +33,7 @@ vswitch = function(x, values, outputs, default=NULL, nThread=getOption("kit. omp = if(.Call(CompEnabledR)) "enabled" else "disabled" #nocov nth = getOption("kit.nThread") #nocov thd = if (nth > 1L) " threads)" else " thread)" #nocov - packageStartupMessage(paste0("Attaching kit 0.0.17 (OPENMP ",omp," using ",nth,thd)) #nocov + packageStartupMessage(paste0("Attaching kit 0.0.18 (OPENMP ",omp," using ",nth,thd)) #nocov } #nocov .onLoad = function(libname, pkgname) { #nocov diff --git a/inst/NEWS.Rd b/inst/NEWS.Rd index 1ccff58..dbf05af 100644 --- a/inst/NEWS.Rd +++ b/inst/NEWS.Rd @@ -4,6 +4,14 @@ \newcommand{\CRANpkg}{\href{https://CRAN.R-project.org/package=#1}{\pkg{#1}}} +\section{version 0.0.18 (2024-06-06)}{ + \subsection{Bug Fixes}{ + \itemize{ + \item Fix \code{iif} tests for new version of R. + } + } +} + \section{version 0.0.17 (2024-05-03)}{ \subsection{Bug Fixes}{ \itemize{ diff --git a/src/iif.c b/src/iif.c index 71a90ef..8d0f58a 100644 --- a/src/iif.c +++ b/src/iif.c @@ -230,7 +230,7 @@ SEXP iifR(SEXP l, SEXP a, SEXP b, SEXP na, SEXP tprom, SEXP nthreads) { const ssize_t namask = len_na>1 ? SSIZE_MAX : 0; const SEXP *restrict pa = SEXPPTR_RO(a); const SEXP *restrict pb = SEXPPTR_RO(b); - const SEXP *restrict pna = SEXPPTR_RO(na); + const SEXP *restrict pna = na_non_null ? SEXPPTR_RO(na) : NULL; for (ssize_t i=0; i