Skip to content

Commit

Permalink
fix to PROMSXP issue #93
Browse files Browse the repository at this point in the history
  • Loading branch information
traversc committed May 2, 2024
1 parent 86eb4ec commit 4e43a3a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]", role = c("aut", "cre", "cph")),
Expand Down
7 changes: 6 additions & 1 deletion src/qs_deserialize_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}


Expand Down

0 comments on commit 4e43a3a

Please sign in to comment.