Displaying 2 results from an estimated 2 matches for "errorcall_return".
2009 Jun 06
1
Qs on calling R from C
Consider the following simple C program:
/*** hello_r.c ***/
#include <Rinternals.h>
SEXP hello() {
return mkString("Hello, world!\n");
}
int main(void) {
SEXP x = hello();
return x == NULL; /* i.e. 0 on success */
}
This program segfaults:
% myR/bin/R CMD LINK gcc -I./R-2.9.0/src/include -L./myR/lib64/R/lib -lR
hello_r.c -o hello_r > /dev/null
% hello_r
zsh:
2006 Feb 16
3
Rf_errorcall - translate to Pascal
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 w...