Skip to content

Commit

Permalink
fixed a bug in handlePtr
Browse files Browse the repository at this point in the history
  • Loading branch information
Konrad1991 committed Dec 5, 2023
1 parent 49c617f commit 21c0231
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/mainclass.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ String <- function(value) {
new("String", value = value)
}

# issue: more type checks should be added for XPtr and R output functions
astClass <- R6::R6Class("astClass",
public = list(
args = NULL,
Expand Down Expand Up @@ -287,6 +288,7 @@ getXPtr <- function(typeList, retType, nameFct) {
}

handlePtr <- function(ptrList, borrow) {
if(length(ptrList) == 0) return("")
ls <- lapply(ptrList, function(x) x[[1]])
rs <- lapply(ptrList, function(x) x[2:length(x)])
stopifnot(length(ls) == length(rs))
Expand Down

0 comments on commit 21c0231

Please sign in to comment.