From plummerm at iarc.fr  Tue Mar  7 16:43:06 2017
From: plummerm at iarc.fr (Martyn Plummer)
Date: Tue, 7 Mar 2017 15:43:06 +0000
Subject: [Rd] Platform dependent native routine registration
In-Reply-To: <CABtg=K=PG7NndoTmBsB6VjkwbR3jTKQ41CaSwtinAzzOJoCDng@mail.gmail.com>
References: <CABtg=KkBqR3+FGPUwaHA4UF=V7fqkhCmvGiKTZ=x3UPP4YRbiQ@mail.gmail.com>
	<22718.51054.27893.394368@max.eddelbuettel.com>
	<CABtg=K=21nKnxtEWDTqafXGxTo8Ke_ET8Kh=SDRsd67N_oUQxw@mail.gmail.com>
	<22718.51415.299096.672599@max.eddelbuettel.com>
	<CABtg=K=PG7NndoTmBsB6VjkwbR3jTKQ41CaSwtinAzzOJoCDng@mail.gmail.com>
Message-ID: <1488901386.2633.28.camel@iarc.fr>

On Tue, 2017-03-07 at 14:57 +0000, G?bor Cs?rdi wrote:
> On Tue, Mar 7, 2017 at 2:51 PM, Dirk Eddelbuettel <edd at debian.org>
> wrote:
> [...]
> > > But I just found that using string literals in .Call() works just
> > > fine. Hopefully
> > > this will still be allowed in the long run:
> > > 
> > > .Call("c_non_existent_function_on_this_platform", ...)
> > 
> > So you are adjusting the literals on the fly at compilation time?
> 
> No, I just leave them there. They are not supposed to be called on a platform
> where the C function does not exist, and even if they would be, that's just an
> error, which is fine.
> 
> I could dynamically include/exclude R code at install time, but that is not so
> easy, either, I would probably need to deal with the docs as well, etc.
> 
> So I'll just leave it there....

You can put platform-specific R code and documentation in a
subdirectory named "unix" or "windows". But there is no provision for
MacOS-specific R code as far as I know.

Martyn


> G.
> 
> > Dirk
> > 
> > --
> > http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Platform dependent native routine registration
Martyn Plummer