isDotC: Determine if a parameter or routine is callable from R

isDotCR Documentation

Determine if a parameter or routine is callable from R

Description

These functions are high-level functions that examine the type of a parameter or all the parameters of a function definition/declaration and determines if they are consistent with R's .Call or .C interfaces.

Usage

isDotC(fun)
isDotCall(fun)
isSEXP(param, quick = TRUE)

Arguments

fun

the function object which is a list of a return type, parameters and a definition cursor.

param

the parameter or type.

quick

a logical value indicating whether to check the name of the type as being equal to "SEXP"

Value

A logical value

Author(s)

Duncan Temple Lang

References

libclang http://clang.llvm.org/doxygen/group__CINDEX.html Writing R Extensions manual

See Also

createRegistrationCode

Examples

f = system.file("exampleCode", "register.c", package = "RCIndex")
args = "-DHAVE_CONFIG_H"
includes = c(sprintf("%s/../src/include", R.home()), sprintf("%s/include", R.home()))
r = getRoutines(f, includes = includes, args = args)
sapply(r, isDotCall)
sapply(r, isDotC)

omegahat/RClangSimple documentation built on April 25, 2024, 4:18 a.m.