}
/* Map OCaml flags to C flags. */
-static int flag_map[] = {
+static const int flag_map[] = {
/* AugSaveBackup */ AUG_SAVE_BACKUP,
/* AugSaveNewFile */ AUG_SAVE_NEWFILE,
/* AugTypeCheck */ AUG_TYPE_CHECK,
ocaml_augeas_create (value rootv, value loadpathv, value flagsv)
{
CAMLparam1 (rootv);
- char *root = String_val (rootv);
- char *loadpath;
+ const char *root = String_val (rootv);
+ const char *loadpath;
int flags = 0, i;
augeas_t t;
CAMLparam2 (tv, pathv);
CAMLlocal2 (optv, v);
augeas_t t = Augeas_t_val (tv);
- char *path = String_val (pathv);
+ const char *path = String_val (pathv);
const char *val;
int r;
CAMLparam2 (tv, pathv);
CAMLlocal1 (v);
augeas_t t = Augeas_t_val (tv);
- char *path = String_val (pathv);
+ const char *path = String_val (pathv);
int r;
r = aug_get (t, path, NULL);
{
CAMLparam4 (tv, beforev, pathv, labelv);
augeas_t t = Augeas_t_val (tv);
- char *path = String_val (pathv);
- char *label = String_val (labelv);
+ const char *path = String_val (pathv);
+ const char *label = String_val (labelv);
int before;
before = beforev == Val_int (0) ? 0 : Int_val (Field (beforev, 0));
{
CAMLparam2 (tv, pathv);
augeas_t t = Augeas_t_val (tv);
- char *path = String_val (pathv);
+ const char *path = String_val (pathv);
int r;
r = aug_rm (t, path);
CAMLparam2 (tv, pathv);
CAMLlocal3 (rv, v, cons);
augeas_t t = Augeas_t_val (tv);
- char *path = String_val (pathv);
+ const char *path = String_val (pathv);
char **matches;
int r, i;
{
CAMLparam2 (tv, pathv);
augeas_t t = Augeas_t_val (tv);
- char *path = String_val (pathv);
+ const char *path = String_val (pathv);
int r;
r = aug_match (t, path, NULL);