Closed dkochmanski closed 4 years ago
Perhaps declare a pi constant and use the type in clx.lisp. Using a slightly wider definition of pi to encompass implementation differences can't be worse than the larger values this definition already lets through. But since this is an override, if a specific implementation is having problems with the circularity maybe just remove them from the inclusion?
pi may be passed from a client library (i.e from outside the xlib package). This override makes it that encoding of the value in x11 protocol fits in the boundaries, so it seems to be the right thing to do. Inlining the conversion seems to solve the problem, and since we know the reason why, we know that it will solve it for any implementation which does the same thing (that is -- expands declarations into type checks).
What is the point of overriding the definition in clx.lisp? Why not have one definition? The wire doesn't actually care and will happily accept anything.
RADIANS->INT16 declares, that the argument is of the type ANGLE. Some implementations when declared put check-type, and the type ANGLE is declared as (SATISFIES ANGLEP). Then, ANGLEP called RADIANS->INT16 internally what lead to infinite recursion.