Skip to content
Prev 52017 / 63421 Next

Suggestion: mkString(NULL) should be NA

On Wed, 25 May 2016, Tim Keitt wrote:

            
In _C_ code.  This is true whether you are calling into the R C API or
any other C library: you as the C programmer need to make sure either
that passing NULL is OK or make sure you don't do that.

I wouldn't object to mkXXX checking for NULL and signaling an error
instead of segfaulting, but good C code calling mkXXX should still
typically do its own check and handle the situation in an appropriate
way.

Best,

luke