Skip to content
Prev 26274 / 63424 Next

CHAR () and Rmpi

I'm not sure what your sticking point here is.  If mpi does not modify 
data in a (char *) pointer, then that really is a (const char *) pointer 
and the headers are being unhelpful in not telling the compiler that 
the data are constant.

If that is the case you need to use casts to (char *) and the following 
private define may be useful to you:

#define CHAR_RW(x) ((char *) CHAR(x))


However, you ask
and the answer is that there is no such way, since (const char *) and 
(char *) are not the same thing and any package that wants to alter the 
contents of a string element needs to create a new CHARSXP to be that 
element.


BTW, you still have not changed Rmpi to remove the configure problems on 
64-bit systems (including assuming libs are in /usr/lib not /usr/lib64) I 
pointed out a long time ago.
On Fri, 28 Sep 2007, Hao Yu wrote: