anchor.diff:    (fpow :int8)
     (opts bdb-options))
   
  -(cffi:defcfun ("tcbdbsetcache" tcbdbsetcache) :pointer
  +(defcfun ("tcbdbsetcache" tcbdbsetcache) :pointer
     (bdb :pointer)
     (lcnum :pointer)
     (ncnum :pointer))
   
  -(cffi:defcfun ("tcbdbsetxmsiz" tcbdbsetxmsiz) :boolean
  +(defcfun ("tcbdbsetxmsiz" tcbdbsetxmsiz) :boolean
     (bdb :pointer)
     (xmsiz :int64))
   
  -(cffi:defcfun ("tcbdbopen" tcbdbopen) :boolean
  +(defcfun ("tcbdbopen" tcbdbopen) :boolean
     (bdb :pointer)
     (path :string)
     (mode bdb-open-flags))
   
  -(cffi:defcfun ("tcbdbclose" tcbdbclose) :boolean
  -  (bdb :pointer))
  -
  -(cffi:defcfun ("tcbdbput" tcbdbput) :boolean
  -  (bdb :pointer)
  -  (kbuf :pointer)
  -  (ksiz :int)
  -  (vbuf :pointer)
  -  (vsiz :int))
  -
  -(cffi:defcfun ("tcbdbput2" tcbdbput2) :boolean
  -  (bdb :pointer)
  -  (kstr :string)
  -  (vstr :string))
  -
  -(cffi:defcfun ("tcbdbputkeep" tcbdbputkeep) :boolean
  -  (bdb :pointer)
  -  (kbuf :pointer)
  -  (ksiz :int)
  -  (vbuf :pointer)
  -  (vsiz :int))
  -
  -(cffi:defcfun ("tcbdbputkeep2" tcbdbputkeep2) :boolean
  -  (bdb :pointer)
  -  (kstr :string)
  -  (vstr :string))
  -
  -(cffi:defcfun ("tcbdbputcat" tcbdbputcat) :boolean
  -  (bdb :pointer)
  -  (kbuf :pointer)
  -  (ksiz :int)
  -  (vbuf :pointer)
  -  (vsiz :int))
  -
  -(cffi:defcfun ("tcbdbputcat2" tcbdbputcat2) :boolean
  -  (bdb :pointer)
  -  (kstr :string)
  -  (vstr :string))
  -
  -(cffi:defcfun ("tcbdbputdup" tcbdbputdup) :boolean
  -  (bdb :pointer)
  -  (kbuf :pointer)
  -  (ksiz :int)
  -  (vbuf :pointer)
  -  (vsiz :int))
  -
  -(cffi:defcfun ("tcbdbputdup2" tcbdbputdup2) :boolean
  -  (bdb :pointer)
  -  (kstr :string)
  -  (vstr :string))
  -
  -(cffi:defcfun ("tcbdbputdup3" tcbdbputdup3) :boolean
  +(defcfun ("tcbdbclose" tcbdbclose) :boolean
  +  (bdb :pointer))
  +
  +(defcfun ("tcbdbput" tcbdbput) :boolean
  +  (bdb :pointer)
  +  (kbuf :pointer)
  +  (ksiz :int)
  +  (vbuf :pointer)
  +  (vsiz :int))
  +
  +(defcfun ("tcbdbput2" tcbdbput2) :boolean
  +  (bdb :pointer)
  +  (kstr :string)
  +  (vstr :string))
  +
  +(defcfun ("tcbdbputkeep" tcbdbputkeep) :boolean
  +  (bdb :pointer)
  +  (kbuf :pointer)
  +  (ksiz :int)
  +  (vbuf :pointer)
  +  (vsiz :int))
  +
  +(defcfun ("tcbdbputkeep2" tcbdbputkeep2) :boolean
  +  (bdb :pointer)
  +  (kstr :string)
  +  (vstr :string))
  +
  +(defcfun ("tcbdbputcat" tcbdbputcat) :boolean
  +  (bdb :pointer)
  +  (kbuf :pointer)
  +  (ksiz :int)
  +  (vbuf :pointer)
  +  (vsiz :int))
  +
  +(defcfun ("tcbdbputcat2" tcbdbputcat2) :boolean
  +  (bdb :pointer)
  +  (kstr :string)
  +  (vstr :string))
  +
  +(defcfun ("tcbdbputdup" tcbdbputdup) :boolean
  +  (bdb :pointer)
  +  (kbuf :pointer)
  +  (ksiz :int)
  +  (vbuf :pointer)
  +  (vsiz :int))
  +
  +(defcfun ("tcbdbputdup2" tcbdbputdup2) :boolean
  +  (bdb :pointer)
  +  (kstr :string)
  +  (vstr :string))
  +
  +(defcfun ("tcbdbputdup3" tcbdbputdup3) :boolean
     (bdb :pointer)
     (kbuf :pointer)
     (ksiz :int)
     (vals :pointer))
   
  -(cffi:defcfun ("tcbdbout" tcbdbout) :boolean
  +(defcfun ("tcbdbout" tcbdbout) :boolean
     (bdb :pointer)
     (kbuf :pointer)
     (ksiz :int))
   
  -(cffi:defcfun ("tcbdbout2" tcbdbout2) :boolean
  -  (bdb :pointer)
  -  (kstr :string))
  -
  -(cffi:defcfun ("tcbdbout3" tcbdbout3) :boolean
  +(defcfun ("tcbdbout2" tcbdbout2) :boolean
  +  (bdb :pointer)
  +  (kstr :string))
  +
  +(defcfun ("tcbdbout3" tcbdbout3) :boolean
     (bdb :pointer)
     (kbuf :pointer)
     (ksiz :int))
   
  -(cffi:defcfun ("tcbdbget" tcbdbget) :pointer
  +(defcfun ("tcbdbget" tcbdbget) :pointer
     (bdb :pointer)
     (kbuf :pointer)
     (ksiz :int)
     (sp :pointer))
   
  -(cffi:defcfun ("tcbdbget2" tcbdbget2) :pointer
  -  (bdb :pointer)
  -  (kstr :string))
  -
  -;; (cffi:defcfun ("tcbdbget3" tcbdbget3) :pointer
  +(defcfun ("tcbdbget2" tcbdbget2) :pointer
  +  (bdb :pointer)
  +  (kstr :string))
  +
  +;; (defcfun ("tcbdbget3" tcbdbget3) :pointer
   ;;   (bdb :pointer)
   ;;   (kbuf :pointer)
   ;;   (ksiz :int)
   ;;   (sp :pointer))
   
  -;; (cffi:defcfun ("tcbdbget4" tcbdbget4) :pointer
  +;; (defcfun ("tcbdbget4" tcbdbget4) :pointer
   ;;   (bdb :pointer)
   ;;   (kbuf :pointer)
   ;;   (ksiz :int))
   
  -(cffi:defcfun ("tcbdbvnum" tcbdbvnum) :int
  +(defcfun ("tcbdbvnum" tcbdbvnum) :int
     (bdb :pointer)
     (kbuf :pointer)
     (ksiz :int))
   
  -(cffi:defcfun ("tcbdbvnum2" tcbdbvnum2) :int
  -  (bdb :pointer)
  -  (kstr :string))
  -
  -(cffi:defcfun ("tcbdbvsiz" tcbdbvsiz) :int
  +(defcfun ("tcbdbvnum2" tcbdbvnum2) :int
  +  (bdb :pointer)
  +  (kstr :string))
  +
  +(defcfun ("tcbdbvsiz" tcbdbvsiz) :int
     (bdb :pointer)
     (kbuf :pointer)
     (ksiz :int))
   
  -(cffi:defcfun ("tcbdbvsiz2" tcbdbvsiz2) :int
  -  (bdb :pointer)
  -  (kstr :string))
  -
  -;; (cffi:defcfun ("tcbdbrange" tcbdbrange) :pointer
  +(defcfun ("tcbdbvsiz2" tcbdbvsiz2) :int
  +  (bdb :pointer)
  +  (kstr :string))
  +
  +;; (defcfun ("tcbdbrange" tcbdbrange) :pointer
   ;;   (bdb :pointer)
   ;;   (bkbuf :pointer)
   ;;   (bksiz :int)
  
positive.code: ;;   (einc :pointer)
  ;;   (max :int))
  
  ;; (cffi:defcfun ("tcbdbfwmkeys" tcbdbfwmkeys) :pointer
  ;;   (bdb :pointer)
  ;;   (pbuf :pointer)
  ;;   (psiz :int)
  ;;   (max :int))
  
  ;; (cffi:defcfun ("tcbdbfwmkeys2" tcbdbfwmkeys2) :pointer
  ;;   (bdb :pointer)
  ;;   (pstr :string)
  ;;   (max :int))
  
  (cffi:defcfun ("tcbdbsync" tcbdbsync) :boolean
    (bdb :pointer))
  
  (cffi:defcfun ("tcbdboptimize" tcbdboptimize) :boolean
    (bdb :pointer)
    (lmemb :int32)
    (nmemb :int32)
  
negative.code: 
  (in-package :tokyo-cabinet-ffi)
  
  (define-foreign-library libtc
    (t (:default "libtokyocabinet")))
  
  (use-foreign-library libtc)
  
  (defconstant +tcesuccess+ 0)
  (defconstant +tcethread+ 1)
  