[UFFI-Users] Re: uffi:deref-pointer (was: casting and types)

Hoehle, Joerg-Cyril Joerg-Cyril.Hoehle at t-systems.com
Tue Aug 24 11:08:33 MDT 2004


Hi,

I wrote:
>odbc-api.lisp says:
>(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.

Regards,
	Jorg Hohle.


More information about the UFFI-Users mailing list