#630 closed defect (fixed)
Cannot apply inline function with optional argument
Reported by: | nklein | Owned by: | gb |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Runtime (threads, GC) | Version: | trunk |
Keywords: | Cc: |
Description
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.
Change History (4)
comment:1 Changed 11 years ago by gb
- Status changed from new to assigned
comment:2 Changed 11 years ago by gb
- Component changed from Compiler to Runtime (threads, GC)
comment:3 Changed 11 years ago by gb
- Resolution set to fixed
- Status changed from assigned to closed
(In [13230]) Copy the # of optional args to the low byte of imm0 before processing &optionals in .SPdestbind. (Fixes ticket:630).
comment:4 Changed 11 years ago by rme
(In [13233]) Merge r13230 (.SPdestbind fix involving processing &optionals). See ticket:630.
The bug seems to be in the x8632 runtime.