[Rd] segfault when using browser() in Rprofile.site

2013-05-24 Thread Benjamin Tyner
Hi. It seems that if I put a browser() in my Rprofile.site, I get a segfault. This happens on several machines, several versions of R. Here it the valgrind output when using revision 62797: ==31314== Memcheck, a memory error detector ==31314== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Se

Re: [Rd] Problem with Rboolean in c++ code

2013-05-24 Thread Jan van der Laan
On 05/24/2013 05:02 PM, Prof Brian Ripley wrote: On 24/05/2013 15:55, Jan van der Laan wrote: Thanks. That does the trick. Although I now have to rewrite some other stuff, but I have just started so better now than later. To be honest, a first and even a second read of the r-extensions manua

Re: [Rd] Problem with Rboolean in c++ code

2013-05-24 Thread Prof Brian Ripley
On 24/05/2013 15:55, Jan van der Laan wrote: Thanks. That does the trick. Although I now have to rewrite some other stuff, but I have just started so better now than later. To be honest, a first and even a second read of the r-extensions manual did not really make it clear, to me at least, that

Re: [Rd] Problem with Rboolean in c++ code

2013-05-24 Thread Jan van der Laan
Thanks. That does the trick. Although I now have to rewrite some other stuff, but I have just started so better now than later. To be honest, a first and even a second read of the r-extensions manual did not really make it clear, to me at least, that Rdefines.h is preferred above Rinterna

Re: [Rd] Problem with Rboolean in c++ code

2013-05-24 Thread Prof Brian Ripley
On 24/05/2013 07:53, Jan van der Laan wrote: I am trying to use R_RegisterCFinalizerEx to ensure some c++ object is properly deleted after use. However, I run into some problems when trying to pass in the third argument which is an Rboolean. The line 'R_RegisterCFinalizerEx(p, finalizer, TRUE);

Re: [Rd] Standalone example to use eval in C (not eval in R)?

2013-05-24 Thread Simon Urbanek
On May 24, 2013, at 6:00 AM, Peng Yu wrote: > 'eval' is used in optim.c, but it is used along with other things. I'm > looking for a standalone example to demonstrate the usage of eval in > C. Does anybody have some a simple example? Thanks. > Try R-exts: "5.11 Evaluating R expressions from C"

[Rd] Standalone example to use eval in C (not eval in R)?

2013-05-24 Thread Peng Yu
'eval' is used in optim.c, but it is used along with other things. I'm looking for a standalone example to demonstrate the usage of eval in C. Does anybody have some a simple example? Thanks. -- Regards, Peng __ R-devel@r-project.org mailing list http

[Rd] Problem with Rboolean in c++ code

2013-05-24 Thread Jan van der Laan
I am trying to use R_RegisterCFinalizerEx to ensure some c++ object is properly deleted after use. However, I run into some problems when trying to pass in the third argument which is an Rboolean. The line 'R_RegisterCFinalizerEx(p, finalizer, TRUE);' generates the following error when t