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). How is this handled in general, I mean, there might be other spots like this. Is it appropriate to ask such questions here? -- Regards, Hans-Peter
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
2006/2/16, Hans-Peter <gchappi at gmail.com>:> [Rf_errorcall is not declared here, would be something like: > void Rf_errorcall(SEXP, const char *,...)] > > ... would it be possible to pull the Rf_errorcall > declaration to the error.h file?error.h doesn't look like a good place as the SEXP type is not known there. Sorry, I am quite unfluent with this c headers... As a sidenote: in Defn.h are two macrogroups: /* Promise Access Macros */ /* Hashing Macros */ which aren't declared in Rinternals.h. This is different from e.g. the groups: /* General Cons Cell Attributes */ /* Primitive Access Macros */ ... -- Regards, Hans-Peter
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. . . Sounds interesting - Could you keep me updated about your progress? I would be interested in the header files to use them in the analysis of simulations from Delphi. Rainer -- -- Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT) Department of Conservation Ecology University of Stellenbosch Matieland 7602 South Africa email: RMK at krugs.de