From e15aaed2febeab9d36f5ffd548cbd89a732ef408 Mon Sep 17 00:00:00 2001 From: "Liam M. Healy" <lhealy@common-lisp.net> Date: Sat, 29 Jan 2011 21:59:24 -0500 Subject: [PATCH] In actual-array-class, don't replace real class names In actual-array-class, if 'category is not one of 'vector, 'matrix or 'both, then assume it's actually a class name and just return it without trying to make a class name. This fixes a problem with e.g. elt+ where the second argument specializer is a class name of the scalar. --- init/defmfun-array.lisp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/init/defmfun-array.lisp b/init/defmfun-array.lisp index a8c52a8d..f369b2c8 100644 --- a/init/defmfun-array.lisp +++ b/init/defmfun-array.lisp @@ -1,6 +1,6 @@ ;; Helpers for defining GSL functions on arrays ;; Liam Healy 2009-01-07 22:01:16EST defmfun-array.lisp -;; Time-stamp: <2011-01-12 00:22:59EST defmfun-array.lisp> +;; Time-stamp: <2011-01-29 21:40:31EST defmfun-array.lisp> ;; ;; Copyright 2009, 2011 Liam M. Healy ;; Distributed under the terms of the GNU General Public License @@ -154,13 +154,15 @@ (case category (:element-type (grid:number-class element-type)) (:component-float-type - (grid:number-class (grid:component-float-type element-type))) - (otherwise - (grid:data-class-name - (if (and (eq category 'both) replace-both) - replace-both - category) - element-type)))) + (grid:number-class (grid:component-float-type element-type))) + ((vector grid:matrix both) + (grid:data-class-name + (if (and (eq category 'both) replace-both) + replace-both + category) + element-type)) + ;; an actual not-to-be-replaced class name + (otherwise category))) (defun actual-class-arglist (arglist element-type c-arguments &optional replace-both) -- GitLab