Loading ...
Sorry, an error occurred while loading the content.
Skip to search.

11107unit not transmited

Expand Messages
  • Florent Monnier
    Jun 1, 2009
      Hi,
      in some libraries bindings, when there are some functions with optional
      parameters we can see that the additional unit at the end is not transmited
      to the C function (see the example below).
      Is it safe to do this ?

      external my_func: ?arg1:int -> ?arg2:int -> unit -> unit = "ml_my_funct"
      CAMLprim value ml_my_func( value arg1, value arg2 ) {
      ...
      }

      instead of :
      CAMLprim value ml_my_func( value arg1, value arg2, value unit ) {
      ...
      }