[Rcpp-devel] ColDatum constructors memory safety

2010-03-12 Thread Alistair Gee
The ColDatum default constructor does not initialize any fields except for "level". But the ColDatum *copy* constructor expects the "type" field to be properly initialized, b/c if type is COLTYPE_FACTOR, the copy constructor proceeds to allocate memory using the numLevels field (which is unreliable

Re: [Rcpp-devel] Returning a named (and classed?) list from an RcppExport SEXP function

2010-03-12 Thread Romain Francois
Le 12/03/10 22:00, Douglas Bates a écrit : > > On Fri, Mar 12, 2010 at 2:23 PM, Romain Francois > wrote: >> Le 12/03/10 18:23, Douglas Bates a écrit : >>> >>> On Fri, Mar 12, 2010 at 10:47 AM, Dirk Eddelbuettel >>> wrote: Hi Doug, Welcome! We're honoured to have you here. An

Re: [Rcpp-devel] Returning a named (and classed?) list from an RcppExport SEXP function

2010-03-12 Thread Douglas Bates
On Fri, Mar 12, 2010 at 2:23 PM, Romain Francois wrote: > Le 12/03/10 18:23, Douglas Bates a écrit : >> >> On Fri, Mar 12, 2010 at 10:47 AM, Dirk Eddelbuettel >>  wrote: >>> >>> Hi Doug, >>> >>> Welcome! We're honoured to have you here. And glad you picked the list. >>> >>> On 12 March 2010 at 10:

Re: [Rcpp-devel] Returning a named (and classed?) list from an RcppExport SEXP function

2010-03-12 Thread Romain Francois
Le 12/03/10 18:23, Douglas Bates a écrit : > > On Fri, Mar 12, 2010 at 10:47 AM, Dirk Eddelbuettel wrote: >> >> Hi Doug, >> >> Welcome! We're honoured to have you here. And glad you picked the list. >> >> On 12 March 2010 at 10:14, Douglas Bates wrote: >> | I have looked at your (i.e. Dirk and Rom

Re: [Rcpp-devel] Returning a named (and classed?) list from an RcppExport SEXP function

2010-03-12 Thread Romain Francois
Hello Doug, Le 12/03/10 17:14, Douglas Bates a écrit : > > I have looked at your (i.e. Dirk and Roman's) submitted Rjournal > article on Rcpp and decided that I should take the plunge. > > To get my feet wet I am starting with a relatively simple example > interfacing to (God help us) 1960's style

Re: [Rcpp-devel] Extra semi-colons in class declarations

2010-03-12 Thread Dirk Eddelbuettel
On 12 March 2010 at 12:56, Douglas Bates wrote: | I usually set the -Wall and -pedantic flags to compilations and have | found that I pages of warnings regarding extra semi-colons from some | of the class declarations. It would be good to remove those extra | punctuation marks (although, I, as a

[Rcpp-devel] Extra semi-colons in class declarations

2010-03-12 Thread Douglas Bates
I usually set the -Wall and -pedantic flags to compilations and have found that I pages of warnings regarding extra semi-colons from some of the class declarations. It would be good to remove those extra punctuation marks (although, I, as a C programmer, am continually being caught at failing to a

Re: [Rcpp-devel] Returning a named (and classed?) list from an RcppExport SEXP function

2010-03-12 Thread Dirk Eddelbuettel
On 12 March 2010 at 11:23, Douglas Bates wrote: | Nice approach. I presume that the Pairlist object is converted to an | VECSXP in the process of being packaged for return. I will play | around a bit with expressions like | | Rcpp::List res(Rcpp::PairList(Rcpp::Named(...), ...)) Not sure if th

Re: [Rcpp-devel] Returning a named (and classed?) list from an RcppExport SEXP function

2010-03-12 Thread Douglas Bates
On Fri, Mar 12, 2010 at 10:47 AM, Dirk Eddelbuettel wrote: > > Hi Doug, > > Welcome! We're honoured to have you here. And glad you picked the list. > > On 12 March 2010 at 10:14, Douglas Bates wrote: > | I have looked at your (i.e. Dirk and Roman's) submitted Rjournal > | article on Rcpp and decid

Re: [Rcpp-devel] Returning a named (and classed?) list from an RcppExport SEXP function

2010-03-12 Thread Dirk Eddelbuettel
Hi Doug, Welcome! We're honoured to have you here. And glad you picked the list. On 12 March 2010 at 10:14, Douglas Bates wrote: | I have looked at your (i.e. Dirk and Roman's) submitted Rjournal | article on Rcpp and decided that I should take the plunge. | | To get my feet wet I am starting w

[Rcpp-devel] Returning a named (and classed?) list from an RcppExport SEXP function

2010-03-12 Thread Douglas Bates
I have looked at your (i.e. Dirk and Roman's) submitted Rjournal article on Rcpp and decided that I should take the plunge. To get my feet wet I am starting with a relatively simple example interfacing to (God help us) 1960's style Fortran written by Mike Powell and incorporated in the minqa packa