Re: [Rd] Crash - cause 'memory not mapped'

2012-11-11 Thread Thomas Lumley
On Sat, Nov 10, 2012 at 12:33 PM, Peter Langfelder <
peter.langfel...@gmail.com> wrote:

> On Fri, Nov 9, 2012 at 3:05 PM, gianluca mastrantonio
>  wrote:
> > the error "memory non mapped" happen also if i use
> > void FiltroGaus(SEXP size1_r, SEXP size2_r, SEXP sigma_r)
> > instead
> > SEXP FiltroGaus(SEXP size1_r, SEXP size2_r, SEXP sigma_r) {
> >
>
> If you use a .Call on a function, the function must return a SEXP, it
> cannot be have a void return value.
>
>
And if one uses a reasonable warning level on the compiler, there should be
a warning, such as gcc's "control reaches end of a non-void function"

Also .C() doesn't pass SEXPs, so the declaration of the function is still
wrong for .C(), though this one the compiler won't notice.

--thomas


-- 
Thomas Lumley
Professor of Biostatistics
University of Auckland

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] What is the INDEX file for?

2012-11-11 Thread Thomas Lumley
On Fri, Nov 9, 2012 at 10:02 PM, Christophe Genolini
wrote:

> Hi the list,
>
> In WRE (or in Rdindex), we can find how the INDEX is make, how to change
> it, but I do not manage to find the purpose of this file. So what is the
> INDEX file for?
>
>
It's an index, or more precisely a table of contents for the package.

The INDEX is part of what is displayed by help(package="pkgname").  It was
more important before package help pages and vignettes, especially for
non-GUI systems when it could be quite hard to work out which function help
pages to look at in an unfamiliar package.

-thomas

-- 
Thomas Lumley
Professor of Biostatistics
University of Auckland

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel