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