Is it safe to call C code from R that mallocs memory for a structure,
returning a pointer to that structure via some 'raw()' parameter. Then,
pass that pointer to another C routine, and finally free the malloced
memory by passing the raw() data to another C routine?
I've written some code that
Isn't this a question clearly in R-devel's domain?
R-devel is intended for questions and discussion about code development
in R. Questions likely to prompt discussion unintelligible to
non-programmers should go to to R-devel.
The short answer is that quite a bit of code, e.g pwilcox and
Prof Brian Ripley wrote:
The short answer is that quite a bit of code, e.g pwilcox and RODBC,
does things like this. You don't need to pass the pointer back to R,
but if you do external pointers are designed for this job.
[reads a bit more of 'Writing R Extensions'...]
Right yes,
BaRow == Barry Rowlingson [EMAIL PROTECTED]
on Fri, 01 Dec 2006 14:09:13 + writes:
BaRow Prof Brian Ripley wrote:
The short answer is that quite a bit of code, e.g pwilcox
and RODBC, does things like this. You don't need to pass
the pointer back to R, but if you do