Bug 17294 - Mark .Call invocations to be ignored by package_native_routine_registration_skeleton
Summary: Mark .Call invocations to be ignored by package_native_routine_registration_s...
Status: UNCONFIRMED
Alias: None
Product: R
Classification: Unclassified
Component: Language (show other bugs)
Version: 3.4.0
Hardware: Other Linux
: P5 enhancement
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2017-06-23 09:31 UTC by Philipp Angerer
Modified: 2017-06-23 09:31 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Angerer 2017-06-23 09:31:48 UTC
At one point in my code use .Call on a variable:

cp <- getFromNamespace(myfun, mypkg)
.Call(cp, v)

Unfortunately, this results in package_native_routine_registration_skeleton creating:

    RcppExport SEXP cp(SEXP);
    static const R_CallMethodDef CallEntries[] = {
        {"cp", (DL_FUNC) &cp, 1},
        {NULL, NULL, 0}
    };
    RcppExport void R_init_destiny(DllInfo *dll) {
        R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
        R_useDynamicSymbols(dll, FALSE);
    }

At the moment I have to do the following to avoid the skeleton creator to falsely identify a “cp” function:

do.call(.Call, list(cp, v))

It would be nice to have a sanctioned way of doing this.