((pointerp (first args)) (mem-aref (%vector-float-to-c-array (first args)) :float (second args)))
在下面代码的这一行中,(second args)
编译时带有警告This is not a number NIL
。该功能有效,但我如何仅使用 Lisp 以独立于实现的方式摆脱此警告。解决方案需要非常快。该代码需要很长时间才能正确运行并且运行良好,因此我无法真正更改它的操作。您不认识的功能与警告消失无关紧要……提前感谢您的帮助。
(defun vector-float (&rest args)
(cond ((eq (first args) nil) (return-from vector-float (%vector-float)))
((listp (first args))
(c-arr-to-vector-float (first args)))
((symbolp (cadr args)) (%vector-float-size (first args)))
((pointerp (first args)) (mem-aref (%vector-float-to-c-array (first args)) :float (second args)))
(t nil)))