On Wed, 19 Jun 2019 at 16:47, mark padgham <mark.padg...@email.com> wrote:
>
> Yeah, but that would require completely rewriting the C code to accept a
> variable for something that is used hundreds of times as a simple macro.
> (Most of that C code is an old library bundled with the package, so not
> my work in that regard.) It would still be enormously easier to robustly
> provide a relative location within the compiled source object to direct
> it to the file ... but how?

I assume you have something like

#define MYMACRO "path/to/file"

and this MYMACRO is used here and there in the internal library.
Instead, you can set

#define MYMACRO getPath()

and this getPath function is defined somewhere and uses R's C API to
find that file and return the path (does someone know whether the
functionality of system.file() is directly accessible from C?).

Iñaki

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to