[Rd] CHAR () and Rmpi

From: Hao Yu <hyu_at_stats.uwo.ca>
Date: Fri, 28 Sep 2007 14:54:28 -0400 (EDT)


Hi. I am the maintainer of Rmpi package. Now I have a problem regarding the change of CHAR () in R 2.6.0. According to R 2.6.0 NEWS:



CHAR() now returns (const char *) since CHARSXPs should no
        longer be modified in place.  This change allows compilers to
        warn or error about improper modification.  Thanks to Herve
        Pages for the suggestion.


Unfortunately this causes Rmpi to fail since MPI requires char pointers rather than const char pointers. Normally I use

    CHAR(STRING_ELT((sexp_rdata),0))
to get the pointer to MPI where a R character vector (C sense) is stored.
Because of the change, all character messengers fail. Is there an easy way to get a char pointer to STRING_ELT((sexp_rdata),0) and is also backward compatible to old R versions. BTW Rmpi does not do any modification of characters at C level.

Thanks
Hao Yu

-- 
Department of Statistics & Actuarial Sciences
Fax Phone#:(519)-661-3813
The University of Western Ontario
Office Phone#:(519)-661-3622
London, Ontario N6A 5B7
http://www.stats.uwo.ca/faculty/yu

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Fri 28 Sep 2007 - 21:49:38 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 29 Sep 2007 - 08:41:36 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.