How to get address of object

2020-07-25 Thread Araq
If your object is really a "ref object" then this does it: cast[ByteAddress](this)

How to get address of object

2020-07-25 Thread jwezel_
I came across an interesting problem in Nim: how to get the address of an object, defined as the memory location of the first byte of the object, in a printable form (uint/string), such that it can be included in a $ operator. I tried cast[ByteAddress](this.unsafeAddr)