Displaying 1 result from an estimated 1 matches for "r_findvar".
Did you mean:
rf_findvar
2009 Nov 28
1
PROTECT and OCaml GC.
Hello.
In the writing of my OCaml-R binding, I'm sort of confused when it comes
to the use of the PROTECT and UNPROTECT macros.
Basically, I have C stub functions that are in charge of calling R for
everything. Here's a simple example:
> CAMLprim value r_findvar (value symbol) {
> /* The findVar function is defined in envir.c. It looks up a symbol
> in an environment. */
> CAMLparam1(symbol);
> CAMLreturn(Val_sexp(findVar(Sexp_val(symbol), R_GlobalEnv)));
> }
This simply makes a call to findVar and returns the value to Objective...