R/dotCall.R

Defines functions isDotCall findDotCallRoutines

findDotCallRoutines =
function(m, demangledOnly = TRUE)
{
   r = getDefinedRoutines(m, names = FALSE)
   ans = r[ sapply(r, isDotCall) ]
   if(demangledOnly) {
       w = names(ans) == demangle(names(ans))
       ans = ans[w]
   }

   ans
}

isDotCall =
function(r)
{
    if(!sameType(getReturnType(r), SEXPType))
        return(FALSE)
    
    ptypes = lapply(getParameters(r), getType)
    w = sapply(ptypes, sameType, SEXPType)
    all(w)
}
duncantl/NativeCodeAnalysis documentation built on Nov. 20, 2023, 5:44 a.m.