anchor.diff:  
   (defmacro with-sdl-event ((event-ptr &optional (event-type :firstevent))
                             &body body)
  -  `(let* ((,event-ptr (new-event))
  +  `(let* ((,event-ptr (new-event ,event-type))
             (result (progn ,@body)))
        (free-event ,event-ptr)
        result))
  
positive.code: 
  (defun push-event (event-type)
    (check-rc (with-sdl-event (event-ptr event-type)
                (sdl2-ffi:sdl-pushevent event-ptr))))
  
  (defun next-event (event-ptr &optional (method :poll) (timeout 1))
    "Method can be either :poll, :wait, or :wait-with-timeout"
    (funcall (case method
               (:poll #'sdl2-ffi:sdl-pollevent)
               (:wait #'sdl2-ffi:sdl-waitevent)
               (:wait-with-timeout
                (lambda (e)
                  (sdl2-ffi:sdl-waiteventtimeout e timeout)))
               (otherwise (error "Event method must be :poll :wait or :wait-with-timeout")))
             event-ptr))
  
  (defmacro with-event-loop ((&key (framerate 60)) &body forms)
    (let ((quit nil))
      (with-sdl-event (sdl-event)
        `(loop until quit
            do ,@forms))))
  
  ;;; The following three functions shouldn't be used in a real
  ;;; game loop. They are simply here for easier testing and
  
negative.code:   (let ((enum-value (foreign-slot-value event-ptr 'sdl2-ffi:sdl-event 'type)))
      (foreign-enum-keyword 'event-type enum-value)))
  
  (defun get-event-struct-data (event-ptr event-type)
    (let* ((event-data (gethash event-type *event-struct-data*)))
      (if (equal nil event-data)
          (nil nil)
          event-data)))
  