anchor.diff:                                (:msbfirst #'identity))
                               (loop for i from 0 below num-bytes collect i)))))
   
  -(defun generate-indexed-converter-expr (rgb-masks num-bytes byte-order)
  +(defun generate-indexed-converter-expr (rgb-masks byte-order num-bytes)
     `(lambda (image-array converted-data mask-data width height inks)  
       (declare (optimize (speed 3)
                          (safety 0)
  
positive.code: 
  (defparameter *pixel-converter-cache* (make-hash-table :test 'equal))
  
  (defun get-indexed-converter (visual-info byte-order bytes-per-pixel)
    (let* ((rgb-masks (list (xlib:visual-info-red-mask visual-info)
                            (xlib:visual-info-green-mask visual-info)
                            (xlib:visual-info-blue-mask visual-info)))
           (key (list rgb-masks byte-order bytes-per-pixel)))
      (symbol-macrolet ((fn (gethash key *pixel-converter-cache*)))
          (or fn (setf fn (compile nil (generate-indexed-converter-expr rgb-masks bytes-per-pixel byte-order)))))))
  
  (defun fill-pixmap-indexed (visual-info depth byte-order array pm pm-gc mask mask-gc w h inks)
    (assert (= (array-total-size array) (* w h)))
  
negative.code:          
      (if (and bytes-per-pixel
               (member byte-order '(:lsbfirst :msbfirst))
               (setf pixel-converter (visual-get-indexed-converter 
                                      visual-info byte-order bytes-per-pixel)))
          ;; Fast path - Image upload
          (let ((converted-data (make-array (* bytes-per-pixel (array-total-size array)) :element-type 'xlib:card8)))
            ;; Fill the pixel arrays
  