From a2adf57c2cde07976bf343b51c2d1217ed45540e Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 9 Oct 2017 12:52:56 +0200 Subject: [PATCH] Add function prototypes for OCaml APIs This allows us to add attribute to them, which cannot be done directly in a function definition. --- augeas-c.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/augeas-c.c b/augeas-c.c index 59a3ef4..64fe99b 100644 --- a/augeas-c.c +++ b/augeas-c.c @@ -29,6 +29,20 @@ #include #include +extern CAMLprim value ocaml_augeas_create (value rootv, value loadpathv, value flagsv); +extern CAMLprim value ocaml_augeas_close (value tv); +extern CAMLprim value ocaml_augeas_get (value tv, value pathv); +extern CAMLprim value ocaml_augeas_exists (value tv, value pathv); +extern CAMLprim value ocaml_augeas_insert (value tv, value beforev, value pathv, value labelv); +extern CAMLprim value ocaml_augeas_rm (value tv, value pathv); +extern CAMLprim value ocaml_augeas_match (value tv, value pathv); +extern CAMLprim value ocaml_augeas_count_matches (value tv, value pathv); +extern CAMLprim value ocaml_augeas_save (value tv); +extern CAMLprim value ocaml_augeas_load (value tv); +extern CAMLprim value ocaml_augeas_set (value tv, value pathv, value valuev); +extern CAMLprim value ocaml_augeas_transform (value tv, value lensv, value filev, value modev); +extern CAMLprim value ocaml_augeas_source (value tv, value pathv); + typedef augeas *augeas_t; /* Map C aug_errcode_t to OCaml error_code. */ -- 1.8.3.1