anchor.diff:                                            key value)))))))
   
   (defun put-int32->octets (db key value fn)
  +  (declare (optimize (speed 3)))
     (declare (type int32 key)
  -           (type (vector (unsigned-byte 8)) value))
  +           (type (vector (unsigned-byte 8)) value)
  +           (type function fn))
     (let ((key-len (foreign-type-size :int32))
           (value-len (length value)))
       (with-foreign-objects ((key-ptr :int32)
  
positive.code: null-terminated."
    (let ((value-ptr nil))
      (unwind-protect
           (with-foreign-string ((key-ptr key-len) key
                                 :null-terminated-p nil)
             (with-foreign-object (size-ptr :int)
               (setf value-ptr (funcall fn (ptr-of db) key-ptr key-len size-ptr))
               (if (null-pointer-p value-ptr)
  
negative.code:         (foreign-string-free value-ptr)))))
  
  (defun put-string->string (db key value fn)
    (declare (optimize (speed 3)))
    (declare (type function fn))
    (or (funcall fn (ptr-of db) key value)
        (maybe-raise-error db (format nil "(key ~a) (value ~a)" key value))))
  
  (defun put-string->octets (db key value fn)
    "Note that for the key we allocate a foreign string that is not
  null-terminated."
    (declare (optimize (speed 3)))
    (declare (type (vector (unsigned-byte 8)) value)
             (type function fn))
    (let ((value-len (length value)))
      (with-foreign-string ((key-ptr key-len) key :null-terminated-p nil)
        (with-foreign-object (value-ptr :unsigned-char value-len)
  