How can I test from within R, without compiling custom C code, if an externalptr
object is a null pointer? The best I can come up with is:
identical(capture.output(print(myptr)), "<pointer: 0x0>")
But that is kind of lame. I can do it in C, but I want to do it in R so that the user doesn't need a compiler.