Skip to content

Commit 1f42e14

Browse files
committed
include the PACKAGE argument when registering C functions
Fixes #111
1 parent 0b3655d commit 1f42e14

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

R/register.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ cpp_register <- function(path = ".", quiet = FALSE) {
5454

5555
init <- generate_init_functions(get_registered_functions(all_decorations, "cpp11::init", quiet))
5656

57-
r_functions <- generate_r_functions(funs, package)
57+
r_functions <- generate_r_functions(funs, package, use_package = TRUE)
5858

5959
dir.create(dirname(r_path), recursive = TRUE, showWarnings = FALSE)
6060

tests/testthat/test-register.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ describe("cpp_register", {
512512
"# Generated by cpp11: do not edit by hand
513513
514514
foo <- function() {
515-
.Call(\"_testPkg_foo\")
515+
.Call(\"_testPkg_foo\", PACKAGE = \"testPkg\")
516516
}
517517
")
518518
cpp_bindings <- file.path(p, "src", "cpp11.cpp")

0 commit comments

Comments
 (0)