isNilPointer: Query if an external pointer or RCReference is NULL

View source: R/cnull.R

isNilPointerR Documentation

Query if an external pointer or RCReference is NULL

Description

This function allows the caller to determine if the external pointer does not point to a valid address in memory but instead points to 0 or NULL. This is an R equivalent to checking if the external pointer is NULL at the C level

Usage

isNilPointer(ref)

Arguments

ref

an external pointer or object that is derived from RCReference (or has a 'ref' slot that is an external pointer).

Value

A logical value that is TRUE if the external pointer value is 0/NULL.

Author(s)

Duncan Temple Lang

Examples

  p = new("externalptr")
  isNilPointer(p)

  r = new("RCReference", ref = p)
  isNilPointer(p)

omegahat/RAutoGenRunTime documentation built on Jan. 12, 2023, 9:19 p.m.