> The manual says that
> "If struct-or-union is a pointer to a structure or union, then it is
> automatically dereferenced." 
> http://common-lisp.net/project/cmucl/doc/cmu-user/aliens.html#toc254
> 
> I think that cmucl does the right thing but if you insist in declaring
> the f as a (the (alien:alien foo) *f*) which it is not, it probably 
> trust your declaration.
> Immanuel

I'm sorry, I'm probably just being dense, but I don't see how this
answers my question.  I'm well aware that pointers are automatically
dereferenced.  My question is why explicitly "the" declaring an
(alien:alien (* foo)) to be an (alien:alien foo) causes a load-time
error if done at the top-level, but works if inside a function.  I
would be much less surprised if these either both worked or neither
worked.  (Actually, if I had to guess, I would expect them both to not
work, given that I compiled with (safety 3), but that's just a gut
feeling.)  In what sense is CMUCL "doing the right thing?"  Why does
it work inside a function and not outside one?

Cheers,

rif

Reply via email to