anchor.diff:    (declare (ignore class))
     #'%surface-destroy)
   
  -(defbinding %surface-set-user-data (surface key data-id) status
  +(defbinding %surface-set-user-data (surface key data-id) status-signal
     (surface pointer)
     ((quark-intern key) pointer-data)
     (data-id pointer-data)
  
positive.code:   (stream-read-func callback)
    (stream pointer-data))
  
  (defbinding surface-write-to-png () status
    (surface surface)
    (filename pathname))
  
  
  (defbinding %surface-write-to-png-stream (surface stream) status
    (surface surface)
    (stream-write-func callback)
    (stream pointer-data))
  
  (defun surface-write-to-png-stream (surface stream)
    (let ((stream-id (register-user-data stream)))
      (unwind-protect
  	 (%surface-write-to-png-stream surface stream-id)
        (destroy-user-data stream-id))))
  
  
  
negative.code: (defbinding %surface-destroy () nil
    (location pointer))
  
  (defbinding %surface-status () status
    pointer)
  
  (defmethod allocate-foreign :around ((surface image-surface) &key)
    (let ((location (call-next-method)))
      (cond
        ((not (eq (%surface-status location) :success))
         (%surface-destroy location)
         (error 'cairo-error :status (%surface-status location)))
        (t location))))
  
  (defmethod reference-function ((class surface-class))
    (declare (ignore class))
    #'%surface-reference)
  