anchor.diff:    (crypto-ex-data-dummy :int))
   
   (defun make-bio-lisp-method ()
  -  (let ((m (cffi:foreign-alloc 'bio-method)))
  -    (setf (cffi:foreign-slot-value m 'bio-method 'type)
  +  (let ((m (cffi:foreign-alloc '(:struct bio-method))))
  +    (setf (cffi:foreign-slot-value m '(:struct bio-method) 'type)
   	  ;; fixme: this is wrong, but presumably still better than some
   	  ;; random value here.
   	  +bio-type-socket+)
       (macrolet ((slot (name)
  -		 `(cffi:foreign-slot-value m 'bio-method ,name)))
  +		 `(cffi:foreign-slot-value m '(:struct bio-method) ,name)))
         (setf (slot 'name) (cffi:foreign-string-alloc "lisp"))
         (setf (slot 'bwrite) (cffi:callback lisp-write))
         (setf (slot 'bread) (cffi:callback lisp-read))
  
positive.code:   n)
  
  (defun clear-retry-flags (bio)
    (setf (cffi:foreign-slot-value bio 'bio 'flags)
  	(logandc2 (cffi:foreign-slot-value bio 'bio 'flags)
  		  (logior +BIO_FLAGS_READ+
  			  +BIO_FLAGS_WRITE+
  			  +BIO_FLAGS_SHOULD_RETRY+))))
  
  (defun set-retry-read (bio)
    (setf (cffi:foreign-slot-value bio 'bio 'flags)
  	(logior (cffi:foreign-slot-value bio 'bio 'flags)
  		+BIO_FLAGS_READ+
  		+BIO_FLAGS_SHOULD_RETRY+)))
  
  
negative.code:       0)))
  
  (cffi:defcallback lisp-create :int ((bio :pointer))
    (setf (cffi:foreign-slot-value bio '(:struct bio) 'init) 1)
    (setf (cffi:foreign-slot-value bio '(:struct bio) 'num) 0)
    (setf (cffi:foreign-slot-value bio '(:struct bio) 'ptr) (cffi:null-pointer))
    (setf (cffi:foreign-slot-value bio '(:struct bio) 'flags) 0)
    1)
  
  (cffi:defcallback lisp-destroy :int ((bio :pointer))
    (cond
      ((cffi:null-pointer-p bio) 0)
      (t
        (setf (cffi:foreign-slot-value bio '(:struct bio) 'init) 0)
        (setf (cffi:foreign-slot-value bio '(:struct bio) 'flags) 0)
        1)))
  
  (setf *bio-lisp-method* nil)		;force reinit if anything changed here
  