Skip to content

Commit

Permalink
Fix pluck_impl() signature (tidyverse#1018)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavisVaughan authored Dec 21, 2022
1 parent 9d9d38f commit 36da3b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions R/pluck.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,13 @@ pluck_exists <- function(.x, ...) {
!is_zap(pluck_raw(.x, list2(...), .default = zap()))
}

pluck_raw <- function(.x, index, .default = NULL, .error_call = caller_env()) {
pluck_raw <- function(.x, index, .default = NULL) {
.Call(
pluck_impl,
x = .x,
index = index,
missing = .default,
strict = FALSE,
error_call = .error_call
strict = FALSE
)
}

Expand Down Expand Up @@ -155,8 +154,7 @@ chuck <- function(.x, ...) {
x = .x,
index = list2(...),
missing = NULL,
strict = TRUE,
error_call = current_env()
strict = TRUE
)
}

Expand Down
4 changes: 2 additions & 2 deletions src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

/* .Call calls */
extern SEXP coerce_impl(SEXP, SEXP);
extern SEXP pluck_impl(SEXP, SEXP, SEXP, SEXP, SEXP);
extern SEXP pluck_impl(SEXP, SEXP, SEXP, SEXP);
extern SEXP flatten_impl(SEXP);
extern SEXP map_impl(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
extern SEXP map2_impl(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
Expand All @@ -19,7 +19,7 @@ extern SEXP vflatten_impl(SEXP, SEXP);

static const R_CallMethodDef CallEntries[] = {
{"coerce_impl", (DL_FUNC) &coerce_impl, 2},
{"pluck_impl", (DL_FUNC) &pluck_impl, 5},
{"pluck_impl", (DL_FUNC) &pluck_impl, 4},
{"flatten_impl", (DL_FUNC) &flatten_impl, 1},
{"map_impl", (DL_FUNC) &map_impl, 6},
{"map2_impl", (DL_FUNC) &map2_impl, 6},
Expand Down

0 comments on commit 36da3b1

Please sign in to comment.