Ticket #630 (closed defect: fixed)
Cannot apply inline function with optional argument
|Reported by:||nklein||Owned by:||gb|
|Component:||Runtime (threads, GC)||Version:||trunk|
I am using CCL 1.4-r13119 (LinuxX8632)
cl-opengl includes the following code:
(defmacro definline (name args &body body) `(progn (declaim (inline ,name)) (defun ,name ,args ,@body))) (definline color (r g b &optional (a 1.0)) (%gl:color-4f r g b a))
If I try to (apply #'gl:color '(0.5 0.5 0.5 1)) inside my function, then I get the following:
Error: Too many arguments in (0.5 0.5 0.5 1).
If, instead, I try (apply #'gl:color '(0.5 0.5 0.5)), it passes NIL rather than 1.0 for the fourth argument.
I can work around it by making a non-inlined wrapper around gl:color and applying that instead.... so it's not a highy priority for me. But, it works for me on other Lisps.
It also seems to work at the REPL, but not in compiled code.