package lintcstubs-arity

  1. Overview
  2. Docs
Generate headers for C bindings

Install

dune-project
 Dependency

Authors

Maintainers

Sources

lintcstubs-arity-0.5.2.tbz
sha256=9fe1fbefa215ad0e6d974500f8259f06cb55f59227d59134fc2fcfa5fe8a840f
sha512=737a11f5dbfab51458e78014f24d4ad045f29bb50f81490a596273c4c84f7a47402b0583707818197bbd9da4da79fbc9ac238d929f9290c414c15e45684bb8df

doc/src/lintcstubs-arity.primitives_of_cmt/native_arg.ml.html

Source file native_arg.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 1 "cmt/lib/native_arg.gte52.ml"
open Ptypes

let native_arg_of_primitive arg =
  let open Primitive in
  match arg with
  | Same_as_ocaml_repr ->
      Value
  | Unboxed_float ->
      Double
  | Unboxed_integer Pnativeint ->
      Intnat {untagged_int= false}
  | Unboxed_integer Pint32 ->
      Int32
  | Unboxed_integer Pint64 ->
      Int64
  | Untagged_immediate ->
      (* the range of this is one bit less than Pnativeint, but still same type on C side *)
      Intnat {untagged_int= true}