anchor.diff:                                     (if (typep val 'cffi:foreign-pointer)
                                          val
                                          (qobject-pointer val))))))
  -                (enum (etypecase obj
  -                        (integer
  -                         (lambda (val si) (setf (si enum) val)))
  -                        (enum
  -                         (lambda (val si) (setf (si enum) (primitive-value val))))))
  -                (int (etypecase obj
  -                       (integer
  -                        (lambda (val si) (setf (si int) val)))
  -                       (enum
  -                        (lambda (val si) (setf (si int) (primitive-value val))))))
  -                (uint (etypecase obj
  -                        (integer
  -                         (lambda (val si) (setf (si uint) val)))
  -                        (enum
  -                         (lambda (val si) (setf (si uint) (primitive-value val))))))
  +                (enum (cond ((subtypep obj-type 'integer)
  +                             (lambda (val si) (setf (si enum) val)))
  +                            ((subtypep obj-type 'enum)
  +                             (lambda (val si) (setf (si enum) (primitive-value val))))
  +                            (t (error "type mismatch: ~s for type slot ~s" obj-type slot))))
  +                (int (cond ((subtypep obj-type 'integer)
  +                            (lambda (val si) (setf (si int) val)))
  +                           ((subtypep obj-type 'enum)
  +                            (lambda (val si) (setf (si int) (primitive-value val))))
  +                           (t (error "type mismatch: ~s for type slot ~s" obj-type slot))))
  +                (uint (cond ((subtypep obj-type 'integer)
  +                             (lambda (val si) (setf (si uint) val)))
  +                            ((subtypep obj-type 'enum)
  +                             (lambda (val si) (setf (si uint) (primitive-value val))))
  +                            (t (error "type mismatch: ~s for type slot ~s" obj-type slot))))
                   (float (lambda (val si) (setf (si float) (float val 1.0s0))))
                   (double (lambda (val si) (setf (si double) (float val 1.0d0))))
                   ;; that leaves:
  
positive.code: (defun marshal (value type stack-item cont)
    (funcall (marshaller value type) value stack-item cont))
  
  (defun marshaller (obj <type>)
    (let* ((set-thunk
            (macrolet
                ((si (slot)
  
negative.code:          (around-type (car around-cons))
           (around-thunk (cdr around-cons)))
      (cond
        ((and primary-thunk (subtypep obj-type primary-type))
         (assert (null around-thunk))
         (named-lambda marshal-primary-outer (value stack-item cont)
           (funcall set-thunk
                    (funcall primary-thunk value)
                    stack-item)
           (funcall cont)))
        ((and around-thunk (subtypep obj-type around-type))
         (named-lambda marshal-around-outer (value stack-item cont)
           (funcall around-thunk
                    value
  