diff options
Diffstat (limited to 'Lisp')
-rw-r--r-- | Lisp/data-types.lisp | 14 | ||||
-rw-r--r-- | Lisp/method-invocation.lisp | 6 |
2 files changed, 5 insertions, 15 deletions
diff --git a/Lisp/data-types.lisp b/Lisp/data-types.lisp index 164bf1b..cd6ba71 100644 --- a/Lisp/data-types.lisp +++ b/Lisp/data-types.lisp @@ -253,20 +253,6 @@ an __exception__, you can simply send it the `self' message. (defclass tagged-union (tagged-struct) ()) -;; FIXME: Either document or throw away. (Does the C language actually -;; support returning arrays from functions? It certainly does not -;; support passing them as arguments.) -(defclass foreign-array (foreign-value) - ((element-type :type symbol - :reader foreign-array-element-type - :initarg :element-type) - (length :type integer - :reader foreign-array-length - :initarg :type) - (typespec :reader foreign-value-typespec - :initarg :typespec))) - - ;; FIXME: Document. (defgeneric foreign-value-lisp-managed-p (foreign-value)) (defmethod foreign-value-lisp-managed-p ((foreign-value foreign-value)) diff --git a/Lisp/method-invocation.lisp b/Lisp/method-invocation.lisp index 0227db0..c16e20d 100644 --- a/Lisp/method-invocation.lisp +++ b/Lisp/method-invocation.lisp @@ -460,13 +460,17 @@ easier to use with __apply__. return-c-type) receiver selector)) - ((struct union array) + ((struct union) ;; The caller is responsible for preventing the return ;; value from being garbage-collected by setting ;; FOREIGN-VALUE-LISP-MANAGED-P to false. (make-struct-wrapper objc-struct-return-value-cell return-type t)) + ((array) + (error "Method ~A of object ~A tried to return an array. ~ + It must be mistaken." + selector receiver)) ((:void) (values)) (otherwise (cffi:mem-ref objc-return-value-cell return-c-type)))))))) |