Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow renaming of R functions #335

Merged
merged 2 commits into from
Dec 31, 2021
Merged

Allow renaming of R functions #335

merged 2 commits into from
Dec 31, 2021

Conversation

andy-thomason
Copy link
Contributor

This PR adds the ability to rename the R functions using the "r_name" attribute.

We also introduce the "mod_name" attribute which may be useful for specialisations
in the future.

Currently, this only works for non-impl functions.

#[extendr(
    use_try_from = true,
    r_name = "test.rename.rlike",
    mod_name = "test_rename_mymod"
)]
fn test_rename() {
}

extendr_module! {
    mod mymod;
    fn test_rename_mymod;
}

@andy-thomason andy-thomason linked an issue Dec 8, 2021 that may be closed by this pull request
@clauswilke
Copy link
Member

I think this one would also do well with an integration test.

@andy-thomason andy-thomason merged commit d13d215 into master Dec 31, 2021
@CGMossa CGMossa deleted the rename-r-functions branch April 30, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Customizing method names in Rust and R
2 participants