Skip to content

Invalid registration code for packages with dot in name  #721

@krlmlr

Description

@krlmlr

Example: ropensci-archive/tic.drat@1370bec#diff-cccf79352b3795dd56362ef855dd939bR23

The generated code reads (comments mine):

static const R_CallMethodDef CallEntries[] = {
    {"tic.drat_divide", (DL_FUNC) &tic.drat_divide, 2}, // remove this
    {"tic_drat_divide", (DL_FUNC) &tic_drat_divide, 2},
    {NULL, NULL, 0}
};

RcppExport void R_init_tic.drat(DllInfo *dll) { // use underscore instead of dot
    R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
    R_useDynamicSymbols(dll, FALSE);
}

The exported function can be called when I register manually (but compileAttributes() still insists on adding its own code): ropensci-archive/tic.drat@7b0bdb3

This is with the latest Rcpp 5ca4f6a.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions