|
From: David M. <dc...@gm...> - 2004-12-25 05:55:42
|
I allocate an event using uffi:with-foreign-object of type sdl:event. Later that event is taken as a parameter to these two functions: (uffi:def-type event-ptr '(* sdl:event)) (defun MME-X (mouse-motion-event) (declare (type event-ptr mouse-motion-event)) (sdl:event-mouse-motion-x mouse-motion-event)) (defun MME-Y (mouse-motion-event) (declare (type event-ptr mouse-motion-event)) (sdl:event-mouse-motion-y mouse-motion-event)) At compile time these functions get the sbcl complaint about %sap-alien conversion. At runtime they account for 90% of the consing of the entire program. Can you see what I'm mis-declaring here that is causing this bad behavior? |