-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
function_description.ml
56 lines (50 loc) · 1.5 KB
/
function_description.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
module Functions (F : Ctypes.FOREIGN) = struct
let ( @-> ) = F.( @-> )
(* RegExp *)
let lre_compile =
F.foreign "lre_compile"
(* int *plen *)
(Ctypes.ptr Ctypes.int
(* char *error_msg *)
@-> Ctypes.ptr Ctypes.char
(* int error_msg_size *)
@-> Ctypes.int
(* const char *buf *)
@-> Ctypes.ocaml_string
(* size_t buf_len *)
@-> Ctypes.size_t
(* int re_flags *)
@-> Ctypes.int
(* void *opaque *)
@-> Ctypes.ptr Ctypes.void
@-> F.returning (Ctypes.ptr Ctypes.uint8_t))
let lre_exec =
F.foreign "lre_exec"
(* uint8_t **capture *)
(Ctypes.ptr (Ctypes.ptr Ctypes.uint8_t)
(* const uint8_t *bc_buf *)
@-> Ctypes.ptr Ctypes.uint8_t
(* const uint8_t *cbuf *)
@-> Ctypes.ptr Ctypes.uint8_t
(* int cindex *)
@-> Ctypes.int
(* int clen *)
@-> Ctypes.int
(* int cbuf_type *)
@-> Ctypes.int
(* void *opaque *)
@-> Ctypes.ptr Ctypes.void
@-> F.returning Ctypes.int)
let lre_get_capture_count =
F.foreign "lre_get_capture_count"
(* const uint8_t *bc_buf *)
(Ctypes.ptr Ctypes.uint8_t @-> F.returning Ctypes.int)
let lre_get_groupnames =
F.foreign "lre_get_groupnames"
(* const uint8_t *bc_buf *)
(Ctypes.ptr Ctypes.uint8_t @-> F.returning (Ctypes.ptr_opt Ctypes.char))
let lre_get_flags =
F.foreign "lre_get_flags"
(* const uint8_t *bc_buf *)
(Ctypes.ptr Ctypes.uint8_t @-> F.returning Ctypes.int)
end