[Rd] calloc() vs. R_Calloc()

Adrian Dușa du@@@@dr|@n @end|ng |rom gm@||@com
Thu Apr 7 08:59:20 CEST 2022


Dear R devs,

I ran into a C level problem that hopefully is a quick fix to a trained eye.

Not sure if I am able to produce a minimal reproducible example, but
suppose a (test) package passes all the local tests, passes the R CMD check
and also passes the tests on both rhub and https://win-builder.r-project.org

The test GitHub repo is here:
https://github.com/dusadrian/QCAtest

As per the latest CRAN recommendation, I need to replace calloc() and
free() with R's Calloc() and Free(). In the above repo, the latest commit
does not pass the tests any longer, and the absolute single difference is
using the recommended commands in the file:
https://github.com/dusadrian/QCAtest/blob/main/src/CCubes.c

The previous initial commit of this file (which has no problems) is here:
https://github.com/dusadrian/QCAtest/blob/5fb13f44457a2071b322ad42ab579f3547d1c551/src/CCubes.c

There must be something obvious I'm doing wrong, perhaps a header missing
or not in the right place, but it just escapes me.
I've tried both Calloc() and R_Calloc(), both versions result in the same
errors.

Many thanks in advance for any hint,
Adrian

	[[alternative HTML version deleted]]



More information about the R-devel mailing list