Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!uunet!wuarchive!emory!ox.com!heifetz!tbomb!time From: time@ice.com (Tim Endres) Newsgroups: comp.sys.mac.programmer Subject: Re: Why won't ResError return the right message? Message-ID: <1CE00001.falep4@tbomb.ice.com> Date: 10 May 91 15:55:11 GMT Reply-To: time@ice.com Organization: ICE Engineering, Inc. Lines: 28 X-Mailer: uAccess - Mac Release: 1.1.b5 In article <1991May9.040511.26710@colorado.edu>, pratt@csn.org (Jonathan Pratt) writes: > >And just to make it worse, *handle won't be NULL for a purged resource, > >but StripAddress(*handle) will be. The purge and resource bits are still > >on (at least in 24 bit memory models). > > > Come on. Programming the Mac is enough work without this kind of dis- > information. Next time get a reference. From Inside Mac: > > Before attempting to access any purgeable block, you must > check its handle to make sure the block is still allocated. > If the handle is empty (that is, h^ = NIL, where h is the > handle), then the block has been purged; ... > > Last I heard, NIL still means zero. :-) Actually, the flags for a handle are stored in the *handle*'s address. Thus, the dereference (* handle) should contain a "pure" address. Thus, the StripAddress() should only be required on the handle and *not* on the handle's dereferenced pointer. tim. ------------------------------------------------------------- Tim Endres | time@ice.com ICE Engineering | uupsi!ice.com!time 8840 Main Street | Voice FAX Whitmore Lake MI. 48189 | (313) 449 8288 (313) 449 9208