anchor.diff:  (deftype-method translate-to-alien enum (type-spec expr &optional copy)
     (declare (ignore copy))
     (let ((args (cdr (type-expand-to 'enum type-spec))))
  -    `(let ((expr ,expr))
  -       (if (integerp expr)
  -	   expr
  -	 (ecase expr
  -	   ,@(map-mappings args :enum-int))))))
  +    `(ecase ,expr
  +       ,@(map-mappings args :enum-int))))
   
   (deftype-method translate-from-alien enum (type-spec expr &optional alloc)
     (declare (ignore alloc))
  
positive.code:   (declare (ignore copy))
    (destructuring-bind (name &rest args) (type-expand-to 'flags type-spec)
      (declare (ignore name))
      (let ((mappings (map-mappings args :flags-int)))
        `(let ((value 0))
  	 (dolist (flag ,expr value)
  	   (setq value (logior value (second (assoc flag ',mappings)))))))))
  
  (deftype-method translate-from-alien flags (type-spec expr &optional alloc)
    (declare (ignore alloc))
    (destructuring-bind (name &rest args) (type-expand-to 'flags type-spec)
      (declare (ignore name))
      (let ((mappings (map-mappings args :int-flags)))
        `(let ((result nil))
  	 (dolist (mapping ',mappings result)
  	   (unless (zerop (logand ,expr (first mapping)))
  	     (push (second mapping) result)))))))
  
negative.code:      (unless (null-pointer-p sap)
         (prog1
  	   (c-call::%naturalize-c-string sap)
  	 ;,(when (eq alloc :copy) `(deallocate-memory ,sap))
  	 ))))
  
  (deftype-method cleanup-alien string (type-spec sap &optional copied)
    (declare (ignore type-spec))
  