Jim Burnes wrote: > Mike Pall wrote: > >This function is only called if you're indexing the returned > >pointer yourself. For example by accessing fd.fd in a __tostring > >metamethod. > I am using __tostring on it. So am I prevented from using metamethods when > returning NULLs or should I used some other technique? No, you can use __tostring. But you better check for a NULL pointer before dereferencing a field. I mean, you wrote that method, right? The default __tostring handler of the FFI doesn't dereference pointers, so it must be your code. --Mike