summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2008-03-05 18:31:49 +0100
committerMatthias Benkard <code@mail.matthias.benkard.de>2008-03-05 18:31:49 +0100
commit3fab07e7cf66542c137a8150ed62a6a3a3affe0b (patch)
treee7fbd3dfdce5584d9ccd54f7cc22d0d8789432ee
parent5eb503f29636c95b686cf94e3f90fd7702d5cfaa (diff)
COLLECT-METHODS: Do not free NULL pointers.
darcs-hash:c65fd128ad2ff1b86c866e1982dc4ad7e5e884c5
-rw-r--r--Lisp/data-types.lisp3
-rw-r--r--Lisp/libobjcl.lisp3
2 files changed, 4 insertions, 2 deletions
diff --git a/Lisp/data-types.lisp b/Lisp/data-types.lisp
index 7c09306..7c08891 100644
--- a/Lisp/data-types.lisp
+++ b/Lisp/data-types.lisp
@@ -127,7 +127,8 @@ The following calls are all equivalent:
(c2mop:set-funcallable-instance-function
selector
#'(lambda (receiver &rest args)
- (apply #'invoke-by-name receiver selector args))))
+ (apply #'invoke-by-name receiver selector args)))
+ selector)
(defmethod initialize-instance :after ((selector selector)
diff --git a/Lisp/libobjcl.lisp b/Lisp/libobjcl.lisp
index f733211..a1e25cb 100644
--- a/Lisp/libobjcl.lisp
+++ b/Lisp/libobjcl.lisp
@@ -938,7 +938,8 @@ separating parts by hyphens works nicely in all of the `:INVERT`,
:pointer
(%objcl-method-selector
(mem-aref method-array :pointer i))))
- (foreign-free method-array))))))
+ (unless (zerop (mem-ref count-buf :unsigned-int))
+ (foreign-free method-array)))))))
(collect-methods class)
(collect-methods (%objcl-class-metaclass class))))