On Wed, Oct 20, 2010 at 5:31 PM, Dirk Eddelbuettel <span dir="ltr"><<a href="mailto:edd@debian.org">edd@debian.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hi Karl,<br>
<br>
Thanks for spotting and fixing those. Out of curiousity, which non-gcc<br>
compiler was that? icc ?<br>
<br>
On 20 October 2010 at 14:22, Karl Millar wrote:<br>
| This patch fixes a couple of minor issues. Both are cases of illegal C++<br>
| code caught by using a non-gcc complier. The first is a bug in<br>
| Vector::fill_dispatch, which would be serious except that the function<br>
| appears to be unused at the moment. The second is just a syntactic issue.<br>
|<br>
| The patch is against the current svn repository.<br>
<br>
Super. We will apply those shortly; I also found another thinko of ours so<br>
maybe we'll just toss out 0.8.8 in due course.<br>
<br>
Thanks, Dirk<br>
<br>
| Thanks,<br>
|<br>
| Karl Millar<br>
|<br>
| ----------------------------------------------------------------------<br>
| Index: Rcpp/inst/include/Rcpp/vector/Vector.h<br>
| ===================================================================<br>
| --- Rcpp/inst/include/Rcpp/vector/Vector.h (revision 2347)<br>
| +++ Rcpp/inst/include/Rcpp/vector/Vector.h (working copy)<br>
| @@ -311,7 +311,7 @@<br>
| // when this is not trivial, this is SEXP<br>
| SEXP elem = PROTECT( converter_type::get( u ) );<br>
| iterator it(begin());<br>
| - for( int i=0; i<size ; i++, ++it){<br>
| + for( int i=0; i<size() ; i++, ++it){<br>
| *it = ::Rf_duplicate( elem ) ;<br>
| }<br>
| UNPROTECT(1) ; /* elem */<br>
| Index: Rcpp/inst/include/Rcpp/XPtr.h<br>
| ===================================================================<br>
| --- Rcpp/inst/include/Rcpp/XPtr.h (revision 2347)<br>
| +++ Rcpp/inst/include/Rcpp/XPtr.h (working copy)<br>
| @@ -59,7 +59,8 @@<br>
| * so you need to make sure the pointer can be "delete" d<br>
| * this way (has to be a C++ object)<br>
| */<br>
| - explicit XPtr(T* p, bool set_delete_finalizer, SEXP tag, SEXP prot);<br>
| + explicit XPtr(T* p, bool set_delete_finalizer = true, SEXP tag = R_NilValue,<br>
| + SEXP prot = R_NilValue);<br></blockquote><div><br>This patch was previously submitted (as part of the Windows compatibility) and<br>was later removed. Note that there is an issue here in that GCC does not<br>
always agree with "non-gcc" compilers on the interpretation of this code.<br>You may have to ifdef the change.<br><br></div></div>Dominick<br><br>