[MLton] Callbacks

Stephen Weeks MLton@mlton.org
Thu, 15 Jan 2004 20:06:09 -0800


> GLUTAPI void APIENTRY glutReshapeFunc(void (GLUTCALLBACK *func)(int width,
> int height));

> void glutReshapeFuncArgument (Int32 x0, Int32 x1);

> GLUT_c.c: In function `callGlutReshapeFunc':
> GLUT_c.c:13: warning: passing arg 1 of `glutReshapeFunc' from incompatible
> pointer type

The warning is because the MLton typedef for Int32 is long, not int,
so the function types aren't equal.  I don't think it indicates any
real problem.  The only fix I can think of is to put in a cast.

The problem with the other two is similar.