package ctypes

  1. Overview
  2. Docs
Combinators for binding to C libraries without writing any C

Install

Dune Dependency

Authors

Maintainers

Sources

0.23.0.tar.gz
sha256=cae47d815b27dd4c824a007f1145856044542fe2588d23a443ef4eefec360bf1
md5=b1af973ec9cf7867a63714e92df82f2a

doc/src/ctypes/ctypes_primitive_types.ml.html

Source file ctypes_primitive_types.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
(*
 * Copyright (c) 2014 Jeremy Yallop.
 *
 * This file is distributed under the terms of the MIT License.
 * See the file LICENSE for details.
 *)

open Unsigned
open Signed

type _ prim =
 | Char : char prim
 | Schar : int prim
 | Uchar : uchar prim
 | Bool : bool prim
 | Short : int prim
 | Int : int prim
 | Long : long prim
 | Llong : llong prim
 | Ushort : ushort prim
 | Sint : sint prim
 | Uint : uint prim
 | Ulong : ulong prim
 | Ullong : ullong prim
 | Size_t : size_t prim
 | Int8_t : int prim
 | Int16_t : int prim
 | Int32_t : int32 prim
 | Int64_t : int64 prim
 | Uint8_t : uint8 prim
 | Uint16_t : uint16 prim
 | Uint32_t : uint32 prim
 | Uint64_t : uint64 prim
 | Camlint : int prim
 | Nativeint : nativeint prim
 | Float : float prim
 | Double : float prim
 | LDouble : LDouble.t prim
 | Complex32 : Complex.t prim
 | Complex64 : Complex.t prim
 | Complexld : ComplexL.t prim

type _ ml_prim = 
  | ML_char :  char ml_prim
  | ML_complex :  Complex.t ml_prim
  | ML_complexld :  ComplexL.t ml_prim
  | ML_float :  float ml_prim
  | ML_ldouble :  LDouble.t ml_prim
  | ML_int :  int ml_prim
  | ML_int32 :  int32 ml_prim
  | ML_int64 :  int64 ml_prim
  | ML_llong :  llong ml_prim
  | ML_long :  long ml_prim
  | ML_sint : sint ml_prim
  | ML_nativeint :  nativeint ml_prim
  | ML_size_t :  size_t ml_prim
  | ML_uchar :  uchar ml_prim
  | ML_bool :  bool ml_prim
  | ML_uint :  uint ml_prim
  | ML_uint16 :  uint16 ml_prim
  | ML_uint32 :  uint32 ml_prim
  | ML_uint64 :  uint64 ml_prim
  | ML_uint8 :  uint8 ml_prim
  | ML_ullong :  ullong ml_prim
  | ML_ulong :  ulong ml_prim
  | ML_ushort :  ushort ml_prim

let ml_prim : type a. a prim -> a ml_prim = function
  | Char -> ML_char
  | Schar -> ML_int
  | Uchar -> ML_uchar
  | Bool -> ML_bool
  | Short -> ML_int
  | Int -> ML_int
  | Long -> ML_long
  | Llong -> ML_llong
  | Ushort -> ML_ushort
  | Sint -> ML_sint
  | Uint -> ML_uint
  | Ulong -> ML_ulong
  | Ullong -> ML_ullong
  | Size_t -> ML_size_t
  | Int8_t -> ML_int
  | Int16_t -> ML_int
  | Int32_t -> ML_int32
  | Int64_t -> ML_int64
  | Uint8_t -> ML_uint8
  | Uint16_t -> ML_uint16
  | Uint32_t -> ML_uint32
  | Uint64_t -> ML_uint64
  | Camlint -> ML_int
  | Nativeint -> ML_nativeint
  | Float -> ML_float
  | Double -> ML_float
  | LDouble -> ML_ldouble
  | Complex32 -> ML_complex
  | Complex64 -> ML_complex
  | Complexld -> ML_complexld
OCaml

Innovation. Community. Security.