[Rd] is it necessary to always register C routines with R_registerRoutines?

From: Vladimir Eremeev <wl2776_at_gmail.com>
Date: Tue 23 Jan 2007 - 11:12:23 GMT

I am writing bindings to the neural network simulator SNNS. At present I have used only .C interface, now I'm studying .Call interface.

I have adapted the example from page 77 of r-exts.pdf, however, it crashes R.
I use MingW as recommended by Duncan Murdoch. Please, tell me what I am missing.
The code is below.

Thank you.

SEXP snns_getVersion(void)
{SEXP version;
 char *v;   

  PROTECT(version=NEW_CHARACTER(15));
  v=CHARACTER_POINTER(version);
  strcpy(v,krui_getVersion());
  UNPROTECT(1);
  return version;
}

> sessionInfo()

R version 2.4.1 (2006-12-18)
i386-pc-mingw32

locale:
LC_COLLATE=Russian_Russia.1251;LC_CTYPE=Russian_Russia.1251;LC_MONETARY=Russian_Russia.1251;LC_NUMERIC=C;LC_TIME=Russian_Russia.1251

attached base packages:

[1] "stats"     "graphics"  "grDevices" "utils"     "datasets"  "methods"  
[7] "base"     
 

-- 
View this message in context: http://www.nabble.com/is-it-necessary-to-always-register-C-routines-with-R_registerRoutines--tf3063486.html#a8519680
Sent from the R devel mailing list archive at Nabble.com.

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Wed Jan 24 19:40:04 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 24 Jan 2007 - 09:31:19 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.