1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 19:50:24 +02:00

a slight add-method speedup

* module/oop/goops.scm (add-method-in-classes!): Use memq instead of
  memv.
This commit is contained in:
Andy Wingo 2009-02-14 00:47:56 +01:00
parent abd6af11cd
commit 81600208f4

View file

@ -503,7 +503,7 @@
;; Add method in all the classes which appears in its specializers list ;; Add method in all the classes which appears in its specializers list
(for-each* (lambda (x) (for-each* (lambda (x)
(let ((dm (class-direct-methods x))) (let ((dm (class-direct-methods x)))
(if (not (memv m dm)) (if (not (memq m dm))
(slot-set! x 'direct-methods (cons m dm))))) (slot-set! x 'direct-methods (cons m dm)))))
(method-specializers m))) (method-specializers m)))