Re: [Rd] Rf_errorcall - translate to Pascal

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Thu 16 Feb 2006 - 10:44:26 GMT

On 2/16/2006 3:55 AM, Hans-Peter wrote:
> Hello!
>
> I (try to) convert the external R header files to Pascal (Delphi). At
> one place I stumbled over a macro that uses a method that is not
> declared in a LGPL header file:
>
> In Rinternals.h:
> #define error_return(msg) { Rf_error(msg); return R_NilValue; }
> #define errorcall_return(cl,msg){ Rf_errorcall(cl, msg); return R_NilValue; }
> ~~~~~~~~
> In Error.h:
> void Rf_error(const char *, ...);
> [Rf_errorcall is not declared here, would be something like:
> void Rf_errorcall(SEXP, const char *,...)]
>
> Is this by purpose or would it be possible to pull the Rf_errorcall
> declaration to the error.h file? It's not that I need the Rf_errorcall
> function, it's more that I am a bit pedantic and like to translate the
> complete thing (based on LGPL (which is more convenient in the Delphi
> world) - well you might not care about this).

Just to be clear: this is a licensing issue, not a technical issue. Error.h is licensed under the LGPL, but Defn.h (where Rf_errorcall is declared) is under the more restrictive GPL.

> How is this handled in general, I mean, there might be other spots
> like this. Is it appropriate to ask such questions here?

I think this is a reasonable forum.

My feeling would be that this is probably an oversight; the public API for R should be self-contained. But I don't know if the fix is to change errorcall_return or to move the Rf_errorcall declaration. Generally things are not put in the public API if there's a feeling that we'd like to change them; we are much more conservative about API changes.

I think it would be helpful to know the scope of the problem. Could you collect together a complete list of examples like this?

Duncan Murdoch



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu Feb 16 21:47:28 2006

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 03:21:41 GMT