From: Nikodemus S. <nik...@ra...> - 2006-10-23 07:04:10
|
Karsten Poeck <kar...@gm...> writes: > I am trying to compile cl-http in sbcl. > The biggest problem I currently have is that cl-http is full of code like > > (defun foo (bar) > (declare (values bar)) > ...) > > Since the declare values seem to be lispm-specific, I added a > (declaim (declaration values)) to the code and in other lisps I have > no problem (some package lock errors, but this is not blocking). Actually, SBCL supports the (non-portable, possibly non-conforming) VALUES declaration just as well as CMUCL: no need for the declaration. > However in sbcl, even after confirming the package-unlock, code like > the above will compile with a warning that the type bar is not defined > and at runtime I get a unknown type error. A values declaration like in your example requires that type BAR is defined. > There are hundreds of (declare (values ..)) in the codebase and I > cannot change them all. That would really be my preferred solution, though. The effect of a values declaration can be portably had with an FTYPE declamation: (declaim (ftype (function (bar) (values bar &optional))) foo) Cheers, -- Nikodemus Schemer: "Buddha is small, clean, and serious." Lispnik: "Buddha is big, has hairy armpits, and laughs." |