-
Notifications
You must be signed in to change notification settings - Fork 33
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
Automatically register C functions #50
Comments
It would be nice if it would also be possible to add custom calls into the generated One way would be if package autho would put the custom init code inside An example of a package that needs this: https://github.com/cran/av/blob/master/src/init.c#L23 |
Perhaps the other way around is easier: The generated function could be renamed from Optionally, if no void R_init_xyz(DllInfo *dll) {
R_init_xyz_symbols(dll);
} Package authors can tweak this |
Another approach suggested by @jeroen
|
pkgbuild now supports generation of the native routine registration for C code. The way this works is it uses tools::package_native_routines_registration_skeleton() to generate the registrations, than inserts them in `src/init.c` between pkgdown specific comments. The rest of the file is passed through unchanged, so if you need to have custom init code or additional includes you can do so just by adding it to the same file, only the code within the comments will be altered when the registration is updated. Fixes #50
pkgbuild now supports generation of the native routine registration for C code. The way this works is it uses tools::package_native_routines_registration_skeleton() to generate the registrations, than inserts them in `src/init.c` between pkgdown specific comments. The rest of the file is passed through unchanged, so if you need to have custom init code or additional includes you can do so just by adding it to the same file, only the code within the comments will be altered when the registration is updated. Fixes #50
pkgbuild now supports generation of the native routine registration for C code. The way this works is it uses tools::package_native_routines_registration_skeleton() to generate the registrations, than inserts them in `src/init.c` between pkgdown specific comments. The rest of the file is passed through unchanged, so if you need to have custom init code or additional includes you can do so just by adding it to the same file, only the code within the comments will be altered when the registration is updated. Fixes #50
pkgbuild now supports generation of the native routine registration for C code. The way this works is it uses tools::package_native_routines_registration_skeleton() to generate the registrations, than inserts them in `src/init.c` between pkgdown specific comments. The rest of the file is passed through unchanged, so if you need to have custom init code or additional includes you can do so just by adding it to the same file, only the code within the comments will be altered when the registration is updated. Fixes #50
pkgbuild now supports generation of the native routine registration for C code. The way this works is it uses tools::package_native_routines_registration_skeleton() to generate the registrations, than inserts them in `src/init.c` between pkgdown specific comments. The rest of the file is passed through unchanged, so if you need to have custom init code or additional includes you can do so just by adding it to the same file, only the code within the comments will be altered when the registration is updated. Fixes #50
pkgbuild now supports generation of the native routine registration for C code. The way this works is it uses tools::package_native_routines_registration_skeleton() to generate the registrations, than inserts them in `src/init.c` between pkgdown specific comments. The rest of the file is passed through unchanged, so if you need to have custom init code or additional includes you can do so just by adding it to the same file, only the code within the comments will be altered when the registration is updated. Fixes #50
pkgbuild now supports generation of the native routine registration for C code. The way this works is it uses tools::package_native_routines_registration_skeleton() to generate the registrations, than inserts them in `src/init.c` between pkgdown specific comments. The rest of the file is passed through unchanged, so if you need to have custom init code or additional includes you can do so just by adding it to the same file, only the code within the comments will be altered when the registration is updated. Fixes #50
If package has
src/
, doesn't use Rcpp, and has either nosrc/init.c
or one previously created by pkgbuild:tools::package_native_routine_registration_skeleton(".", character_only = FALSE)
useDynLib(package, .registration = TRUE)
The text was updated successfully, but these errors were encountered: