[Openmcl-devel] Re: slot-value != struct-ref? (never mind)

Gary Byers gb at clozure.com
Mon May 30 19:04:45 PDT 2005

On Mon, 30 May 2005, alex crain wrote:

> On May 30, 2005, at 7:48 PM, Gary Byers wrote:
>> I've been planning on getting to the TODO list above Real Soon Now
>> (and that's been the plan for the last few weeks)
> Well, for better or for worse I'm working on it now, so if you've got other 
> things
> to do then I'll take care of it.
> Can you suggest a starting place for the problem with :STRUCT returns? It
> wasn't on your todo list, but it's pretty high on mine - I got into getting 
> rid of the
> warnings because I wanted to clear up any tangential problems before I took 
> that on.
> Specifically - which is correct (:struct :<NSR>ect foo) or (:struct 
> :_<NSR>ect foo) ?
> :alex

As it's currently implemented, the latter is correct. "_NSRect" is a 
structure tag; "NSRect" is a type defined by

typedef struct _NSRect NSRect;

There are other places in the FFI that are more lenient about this
distinction (saying "(rlet ((x :<NSR>ect)) ..." is entirely equivalent
to saying "(rlet ((x (:struct :_<NSR>ect)) ..."), but in this case
you have to have said (:STRUCT ...) in the first place, and it
may be more consistent to insist on a structure tag there.

Aside from that issue, I think that the bugs related to defining
methods that return structures have been fixed in the bleeding-edge
sources; in partucular, the method's type signature claims that the
method returns a structure, and I believe that this is now encoded

More information about the Openmcl-devel mailing list