| Paste number 90582: | untitled |
| Pasted by: | Haplo_ |
| When: | 9 months, 2 weeks ago |
| Share: | Tweet this! | http://paste.lisp.org/+1XW6 |
| Channel: | #lisp |
| Paste contents: |
(macrolet ((make-mumble-equal (type)
;; Since caching is only done for objects created by the
;; client, we must always compare ID and display for
;; non-identical mumbles.
(let ((predicate (xintern type '-equal))
(id (xintern type '-id))
(dpy (xintern type '-display)))
`(within-definition (,type make-mumble-equal)
(defun ,predicate (a b)
(declare (type (or null ,type) a b))
(when (and a b)
(or (eql a b)
(and (= (,id a) (,id b))
(eq (,dpy a) (,dpy b))))))))))
(make-mumble-equal window)
(make-mumble-equal pixmap)
(make-mumble-equal cursor)
(make-mumble-equal font)
(make-mumble-equal gcontext)
(make-mumble-equal colormap)
(make-mumble-equal drawable))
This paste has no annotations.