-;;;; Callback and user data mechanism
-
-(declaim (fixnum *user-data-count*))
-
-(defvar *user-data* (make-hash-table))
-(defvar *user-data-count* 0)
-
-(defun register-user-data (object &optional destroy-function)
- (check-type destroy-function (or null symbol function))
-; (incf *user-data-count*)
- (setq *user-data-count* (the fixnum (1+ *user-data-count*)))
- (setf
- (gethash *user-data-count* *user-data*)
- (cons object destroy-function))
- *user-data-count*)
-
-
-(defun find-user-data (id)
- (check-type id fixnum)
- (multiple-value-bind (user-data p) (gethash id *user-data*)
- (values (car user-data) p)))
-