[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Suggestion - rlet with clear
- To: bug@cambridge.apple.com, info-mcl@cambridge.apple.com
- Subject: Suggestion - rlet with clear
- From: jbk@world.std.com (Jeffrey B Kane)
- Date: Sun, 7 Feb 1993 12:02:23 -0500
I wanted to throw out a suggestion for an optional argument to
the rlet macro which first clears any structures it allocates
with NewPtr (and before it makes any assignments to the fields).
I have several cases where I have to manually clear the fields.
I would try using the ccl::%clear-pointer or ccl::%clear-block but
there are two problems:
1) They are undocumented
2) I then have to add a statemtent to assign each field and lose the
convenience of the rlet macro.
An example might be:
(rlet ((p :ParamBlockRec :clear t
:ioNamePtr volName
:ioVRefNum vRefNum))
(#_SomeHFSCall pb)
(pref pb :ParamBlockRec.ioResult))
Jeffrey
======================================
Jeffrey Kane, MD
Kane Biomedical Systems
Boston, MA
Internet jbk@world.std.com
Compuserve 74206,640
AppleLink D0738
[Don't take life too seriously... it's not like anyone gets out of it alive.]