From kry|ov@r00t @end|ng |rom gm@||@com  Mon Dec 16 11:33:34 2019
From: kry|ov@r00t @end|ng |rom gm@||@com (Ivan Krylov)
Date: Mon, 16 Dec 2019 13:33:34 +0300
Subject: [Rd] source definition for R_NilValue/return from
 TYPEOF(R_NilValue)
In-Reply-To: <daf586e7f4804036b8bb135226140bf0b77e2872.camel@adelaide.edu.au>
References: <daf586e7f4804036b8bb135226140bf0b77e2872.camel@adelaide.edu.au>
Message-ID: <20191216133334.582b290d@trisector>

On Sun, 15 Dec 2019 10:47:11 +0000
Dan Kortschak <dan.kortschak at adelaide.edu.au> wrote:

> I'd like to see the source definition of R_NilValue, but after
> fair bit of searching I cannot find an obviously location for this.
> 
> Would someone please point me in the right direction?

As far as I understand, the assignment to R_NilValue happens in
src/main/memory.c:

https://github.com/wch/r-source/blob/776929704cb4f9398f52805f48f2c93582ec3d38/src/main/memory.c#L2186

(see the definition of GET_FREE_NODE(s) in the same file)

Besides declaring R_NulValue as "extern" and assignments in void
InitMemory(), there doesn't seem to be anything else.

-- 
Best regards,
Ivan



[Rd] source definition for R_NilValue/return from TYPEOF(R_NilValue)
Ivan Krylov