Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005946OCamlOCaml otherlibspublic2013-03-12 18:242014-05-25 20:20
Assigned Todoligez 
PlatformOSOS Version
Product Version4.00.1 
Target Version4.02.0+devFixed in Version 
Summary0005946: CAMLprim taking (void) as argument
DescriptionSome C primitives of the OCaml otherlibs runtime are declared with "void" as parameters, and take the OCaml value () when they are called. It is not C-valid but works in practice with most C compilers.

I wrote a patch to fix it.
Steps To ReproduceTo search these invalid functions, run:

$ grep -RIni CAMLprim otherlibs | grep '(void)'
otherlibs/labltk/support/cltkEvent.c:25:CAMLprim value camltk_tk_mainloop(void)
otherlibs/win32graph/draw.c:62:CAMLprim value caml_gr_current_x(void)
otherlibs/win32graph/draw.c:67:CAMLprim value caml_gr_current_y(void)
otherlibs/win32graph/draw.c:316:CAMLprim value caml_gr_get_mousex(void)
otherlibs/win32graph/draw.c:324:CAMLprim value caml_gr_get_mousey(void)
otherlibs/win32graph/open.c:42:CAMLprim value caml_gr_clear_graph(void);
otherlibs/win32graph/open.c:271:CAMLprim value caml_gr_close_graph(void)
otherlibs/win32graph/open.c:280:CAMLprim value caml_gr_clear_graph(void)
otherlibs/win32graph/open.c:294:CAMLprim value caml_gr_size_x(void)
otherlibs/win32graph/open.c:300:CAMLprim value caml_gr_size_y(void)
otherlibs/win32graph/open.c:315:CAMLprim value caml_gr_synchronize(void)
otherlibs/win32graph/open.c:340:CAMLprim value caml_gr_sigio_handler(void)
Attached Filesdiff file icon ocaml-4.00.1-CAMLprim-void.diff [^] (3,163 bytes) 2013-03-12 18:24 [Show Content]

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2013-03-12 18:24 bvaugon New Issue
2013-03-12 18:24 bvaugon File Added: ocaml-4.00.1-CAMLprim-void.diff
2013-03-17 17:15 gasche Assigned To => doligez
2013-03-17 17:15 gasche Status new => assigned
2013-07-12 09:43 doligez Target Version => 4.01.0+dev
2013-08-19 16:05 doligez Target Version 4.01.0+dev => 4.01.1+dev
2013-12-16 14:30 doligez Tag Attached: patch
2014-05-25 20:20 doligez Target Version 4.01.1+dev => 4.02.0+dev

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker