Skip to content

Commit

Permalink
Revert "Revert fb18a2d"
Browse files Browse the repository at this point in the history
This reverts commit 9a9b340c9f8f9caa9125e6c55d6502a76a2c5884.
  • Loading branch information
krlmlr committed Jul 4, 2024
1 parent 154b39d commit 65f5f0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inst/include/cpp11/external_pointer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ class external_pointer {

external_pointer(SEXP data) : data_(valid_type(data)) {}

external_pointer(pointer p, bool use_deleter = true, bool finalize_on_exit = true)
: data_(safe[R_MakeExternalPtr]((void*)p, R_NilValue, R_NilValue)) {
external_pointer(pointer p, bool use_deleter = true, bool finalize_on_exit = true, SEXP prot = R_NilValue)
: data_(safe[R_MakeExternalPtr]((void*)p, R_NilValue, prot)) {
if (use_deleter) {
R_RegisterCFinalizerEx(data_, r_deleter, static_cast<r_bool>(finalize_on_exit));
}
Expand Down

0 comments on commit 65f5f0b

Please sign in to comment.