Skip to content

Commit

Permalink
Merge pull request #16 from nlmixr2/16-rm-set-typeof
Browse files Browse the repository at this point in the history
Remove SET_TYPEOF
  • Loading branch information
mattfidler authored Aug 13, 2024
2 parents f61c1d1 + 2e9f268 commit 72a8b50
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: dparser
Title: Port of 'Dparser' Package
Version: 1.3.1-11
Version: 1.3.1-12
Authors@R: c(person("Matthew", "Fidler", email = "[email protected]", role = c("aut", "cre")),
person("John", "Plevyak", role = c("aut", "cph"), email = "[email protected]"))
Imports:
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# dparser 1.3.1-12

- Changed language access to not use `SET_TYPEOF` (as required by CRAN)

# dparser 1.3.1-11

- Changed `gram.c` to handle NULL strings without printing them (as requested by CRAN)
Expand Down
6 changes: 2 additions & 4 deletions src/rdparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ void callparsefn(char *name, char *value, int pos, int depth, SEXP fn, SEXP env)
fn(name = name, value = value, pos = pos, depth = depth)
*/
SEXP s, t;
t = s = PROTECT(allocList(5));
SET_TYPEOF(s, LANGSXP);
t = s = PROTECT(LCONS(R_NilValue, allocList(4)));
SETCAR(t, fn); t = CDR(t);
// name = name
SETCAR(t, mkString(name));
Expand All @@ -52,8 +51,7 @@ int callskipchildrenfn(char *name, char *value, int pos, int depth, SEXP skip_fn
*/
SEXP s, t;
int ret;
t = s = PROTECT(allocList(5));
SET_TYPEOF(s, LANGSXP);
t = s = PROTECT(LCONS(R_NilValue, allocList(4)));
SETCAR(t, skip_fn); t = CDR(t);
// name = name
SETCAR(t, mkString(name));
Expand Down

0 comments on commit 72a8b50

Please sign in to comment.