Re: correct way to find if 32bits is an object pointer?
Re: correct way to find if 32bits is an object pointer?
- Subject: Re: correct way to find if 32bits is an object pointer?
- From: Ondra Cada <email@hidden>
- Date: Tue, 19 Feb 2002 15:05:09 +0100
Lance,
>
>>>>> Lance Bland (LB) wrote at Tue, 19 Feb 2002 08:43:05 -0500:
LB> before I look into a hack ... does anyone know the correct way to find
LB> if an arbitrary 32bit pattern (int) is an obj-c instance pointer
AFAIK, this is quite difficult. If you do need that, you have to first check
whether the address itself is valid (see vm_region()), and if so, check its
contents ("manually", ie. check whether the isa value is valid itself,
whether is has proper contents like the class name, etc.).
LB> in the current executable image?
Pardon? If you wanted to know whether the instance was created by the
"current executable image" code (instead of some library code), you are out
of luck: this information is nowhere stored.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.