object_getInstanceVariable() - Problem
object_getInstanceVariable() - Problem
- Subject: object_getInstanceVariable() - Problem
- From: Michael Monscheuer <email@hidden>
- Date: Tue, 02 Dec 2003 20:34:40 +0100
Has anyone successfully used the function object_getInstanceVariable() ?
I stepped through my program with debugger and found out, that it is not
working as documented.
Documentation says:
----
Ivar object_getInstanceVariable
(id object, const char *name, void **value);
(..)
value:
A pointer to a pointer to a value. On output, contains a pointer to the
value of the instance variable.
----
But instead of a returned pointer in **value, the value itself is
returned! So if I try to access the variable value via
NSValue's value:WithCType: I consequently get some bad accesses...
So how to get the address of an instance variable correctly?
Is this really a bug, that I stepped into?
Thanx in advance...
--
=======================================================
And refashioning the fashioned
lest it stiffen into iron
is work of endless vital activity.
[Goethe]
mailto:email@hidden
mailto:email@hidden
All about CALAMUS DTP suite:
http://www.calamus.net
=======================================================
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.