[m-rev.] for review: changes for mercury_opengl

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Aug 11 16:32:42 AEST 2003


On 11-Aug-2003, Julien Fischer <juliensf at students.cs.mu.OZ.AU> wrote:
> 
> Index: mercury_opengl/mglu.m
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/extras/graphics/mercury_opengl/mglu.m,v
> retrieving revision 1.1
> diff -u -r1.1 mglu.m
> --- mercury_opengl/mglu.m	10 Mar 1998 06:31:37 -0000	1.1
> +++ mercury_opengl/mglu.m	11 Aug 2003 04:45:20 -0000
> @@ -185,13 +185,13 @@
>  bool_to_int(no) = 0.
> 
>  :- pragma c_code(new_quadric(Q::out, IO0::di, IO::uo), "
> -	Q = gluNewQuadric();
> +	Q = (MR_Word)gluNewQuadric();
>  	IO = IO0;
>  ").
>
>  :- pragma c_code(delete_quadric(Q::in, IO0::di, IO::uo), "
> -	gluDeleteQuadric(Q);
> +	gluDeleteQuadric((GLUquadric *)Q);
>  	IO = IO0;
>  ").
...

It would be nicer to use `pragma foreign_type' to declare
that the `quadric' type is `GLUquadric *', rather than
adding lots of casts everywhere.

Otherwise, that change looks fine.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list