From du@@@@dr|@n @end|ng |rom gm@||@com  Thu Apr  7 08:59:20 2022
From: du@@@@dr|@n @end|ng |rom gm@||@com (=?UTF-8?B?QWRyaWFuIER1yJlh?=)
Date: Thu, 7 Apr 2022 09:59:20 +0300
Subject: [Rd] calloc() vs. R_Calloc()
Message-ID: <CAJ=0CtBMDXf4R0DR40whvXS5i8=KUrPRqbZWC-TWWeU2DfzQjw@mail.gmail.com>

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]]



[Rd] calloc() vs. R_Calloc()
=?UTF-8?B?QWRyaWFuIER1yJlh?=