[Openmcl-devel] Calling STRETs without SEND

Ron Garret ron at awun.net
Tue Jun 2 10:06:30 PDT 2009


On Jun 2, 2009, at 9:49 AM, Raffael Cavallaro wrote:

>
> On Jun 2, 2009, at 12:41 PM, Ron Garret wrote:
>
>> Following an recent admonition that SEND is deprecated, I've been
>> converting all my old code to call ObjC methods directly using the #/
>> reader macro.  However, this doesn't seem to work for STRET calls,
>> e.g.:
>>
>> (ccl::slet ((event-location (#/locationInWindow event)) ...
>>
>> gives me:
>>
>>> Error: Unrecognized STRET call in (NEXTSTEP-FUNCTIONS:|
>> locationInWindow| EVENT)
>>> While executing: CCL::SLETIFY, in process Listener(7).
>>
>> while:
>>
>> (ccl::slet ((event-location (send event 'location-In-Window)) ...
>>
>> works.
>>
>> The examples in the manual also use SEND.
>>
>> What is the proper way to call STRETs?
>
> I've just been converting these to ordinary let/let*:
>
> (let* ((bounds-rect (#/bounds view) ...
>
> The Clozure folks will let us know if this is inadvisable

Empirically this does seem to work, but section 13.4.2 of the CCL  
manual seems to imply that it shouldn't.  So I'm a little hesitant to  
employ this technique without official blessing for fear of latent  
memory issues.

rg




More information about the Openmcl-devel mailing list