[Openmcl-devel] EXTERNAL-CALL type checking with constants
ralex at cs.colorado.edu
Sat Feb 20 19:22:03 UTC 2010
Some parameter types of external functions appear not be checked (at all or the same) when invoked using parameters that are constant, e.g.
OpenGL function definition of GLPUSHNAME. Notice <GL>UINT which is an unsigned int
(DEFUN GLPUSHNAME (GLUINT-0)
(CCL:EXTERNAL-CALL "glPushName" :<GL>UINT GLUINT-0 :VOID))
calling like this:
(let ((View (view-named *w* "world"))) ;;; need to have an glcontext to avoid crashing
(glPushName (- (random 2) 2))))
can result in an error, e.g., Error: value -1 is not of the expected type (UNSIGNED-BYTE 32). Good!
(let ((View (view-named *w* "world")))
will not create an error or warning at all. I assume this could be some compiler inlining "optimization"? What could be done?
Prof. Alexander Repenning
University of Colorado
Computer Science Department
Boulder, CO 80309-430
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Openmcl-devel