[UFFI-Users] Re: uffi:deref-pointer (was: casting and types)
Joerg-Cyril.Hoehle at t-systems.com
Tue Aug 24 11:08:33 MDT 2004
>(defun get-cast-int (ptr)
> (locally (declare (type int-pointer-type ptr))
> (deref-pointer ptr :int)))
>"If you want to cast a pointer to another type use
>WITH-CAST-POINTER together with DEREF-POINTER/DEREF-ARRAY."
>So I believe the above code is incorrect.
Probably not, after all. It looks like the declaration is just an optimization, and the pointer already has the correct type. So WITH-CAST-POINTER is not needed in these places of clsql.
More information about the UFFI-Users