diff --git a/ChangeLog b/ChangeLog index 39fa567..4236eb8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +Version 0.26.2 (2024-05-01) + * Return NULL and issue a warning when unserializing a PROMSXP (see https://github.com/traversc/qs/issues/93) + Version 0.26.2 (2024-03-18) * Change check for requiring `-latomic` flag to use `AC_COMPILE_IFELSE` (https://github.com/traversc/qs/issues/88, https://github.com/traversc/qs/issues/91, https://github.com/traversc/qs/issues/76) diff --git a/DESCRIPTION b/DESCRIPTION index 4593695..7a205cd 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: qs Type: Package Title: Quick Serialization of R Objects -Version: 0.26.2 +Version: 0.26.3 Date: 2024-05-01 Authors@R: c( person("Travers", "Ching", email = "traversc@gmail.com", role = c("aut", "cre", "cph")), diff --git a/src/qs_deserialize_common.h b/src/qs_deserialize_common.h index e51ab82..7ed2216 100644 --- a/src/qs_deserialize_common.h +++ b/src/qs_deserialize_common.h @@ -646,7 +646,12 @@ SEXP processBlock(T * const sobj) { SET_S4_OBJECT(obj); // SET_OBJECT(obj, 1); // this flag seems kind of pointless } - return obj; + if(TYPEOF(obj) == PROMSXP) { + Rcpp::warning("PROMSXP detected, replacing with NULL (see https://github.com/traversc/qs/issues/93)"); + return R_NilValue; + } else { + return obj; + } }