summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lisp/instance-management.lisp11
1 files changed, 6 insertions, 5 deletions
diff --git a/Lisp/instance-management.lisp b/Lisp/instance-management.lisp
index ab2e0bb..371e78f 100644
--- a/Lisp/instance-management.lisp
+++ b/Lisp/instance-management.lisp
@@ -23,11 +23,12 @@
(defun intern-lisp-managed-foreign-instance (&rest initargs &key pointer)
(let ((key (cffi:pointer-address pointer)))
(or (gethash key *lisp-managed-instances* nil)
- (apply #'make-instance
- (intern-pointer-wrapper
- 'class
- :pointer (%objcl-object-get-class pointer))
- initargs))))
+ (setf (gethash key *lisp-managed-instances*)
+ (apply #'make-instance
+ (intern-pointer-wrapper
+ 'class
+ :pointer (%objcl-object-get-class pointer))
+ initargs)))))
(defun unintern-lisp-managed-foreign-instance (instance)
(remhash (cffi:pointer-address (pointer-to instance))