I think your problem is that %@
is only meaningful if shape->data
really points to an Objective-C object, since using it triggers the sending of -description
to obj
.
But if for example shape->data
points to an int
, the message will be send to an object that does not really exists. Instead, some memory location may be interpreted as the raw bytes of an object, causing the runtime to crash.
To answer your question: The type of an void pointer is void *
, and the type of the pointer's target is void
. You can print the pointer's value with %p
, but I doubt that this is what you want.
So if you are sure that the memory location where shape->data
points to represents an Objective-C object, and you have access to the class code, you can override -description
to print whatever information you like.