search for: caml_modify

Displaying 10 results from an estimated 10 matches for "caml_modify".

2009 Nov 22
1
[LLVMdev] question on the ocaml compatible collector
...rbageCollection.html#ocaml I stumbled across the sentence "...The ocaml collector does not use read or write barriers, so the user program may use load and store instead of llvm.gcread and llvm.gcwrite..." Which I believe is wrong as the ocaml collector does indeed use a write barrier (caml_modify). But maybe I misunderstood? Thanks, Benedikt Grundmann -- Calvin: I try to make everyone's day a little more surreal. (From Calvin & Hobbes)
2009 Aug 28
1
[PATCHES] avoid more warnings
...quot; CAMLreturn (Atom (0));\n"; + pr " else {\n"; + pr " rv = caml_alloc (%ss->len, 0);\n" typ; + pr " for (i = 0; i < %ss->len; ++i) {\n" typ; + pr " v = copy_%s (&%ss->val[i]);\n" typ typ; + pr " caml_modify (&Field (rv, i), v);\n"; + pr " }\n"; + pr " CAMLreturn (rv);\n"; + pr " }\n"; + pr "}\n"; + pr "\n"; + in + List.iter ( fun (typ, cols) -> let has_optpercent_col = @@ -6738,29 +6761,17 @@ copy_table...
2016 Jul 18
2
[PATCH] mllib: Getopt: fix integer parsing
...t_int of string * int ref */ - if (sscanf (optarg, "%d", &num) != 1) { - fprintf (stderr, _("'%s' is not a numeric value.\n"), - guestfs_int_program_name); - show_error (EXIT_FAILURE); - } + num = strtoint (optarg); caml_modify (&Field (Field (actionv, 1), 0), Val_int (num)); break; -- 2.7.4
2016 Jul 18
0
Re: [PATCH] mllib: Getopt: fix integer parsing
...if (sscanf (optarg, "%d", &num) != 1) { > - fprintf (stderr, _("'%s' is not a numeric value.\n"), > - guestfs_int_program_name); > - show_error (EXIT_FAILURE); > - } > + num = strtoint (optarg); > caml_modify (&Field (Field (actionv, 1), 0), Val_int (num)); > break; > > -- > 2.7.4 > > _______________________________________________ > Libguestfs mailing list > Libguestfs@redhat.com > https://www.redhat.com/mailman/listinfo/libguestfs -- Richard Jones, Virtualiz...
2016 Jul 11
2
[PATCH v2] OCaml tools: add and use a Getopt module
...} + + specv = Field (specsv, specv_index); + actionv = Field (specv, 1); + + switch (Tag_val (actionv)) { + int num; + + case 0: /* Unit of (unit -> unit) */ + v = Field (actionv, 0); + do_call1 (v, Val_unit); + break; + + case 1: /* Set of bool ref */ + caml_modify (&Field (Field (actionv, 0), 0), Val_true); + break; + + case 2: /* Clear of bool ref */ + caml_modify (&Field (Field (actionv, 0), 0), Val_false); + break; + + case 3: /* String of string * (string -> unit) */ + v = Field (actionv, 1); + v2 = caml_copy_s...
2016 Jul 18
4
[PATCH 1/3] mllib: Getopt: point to man page as additional help
On error, point also to the man page of the current tool in addition to '$TOOL --help'. --- mllib/getopt-c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mllib/getopt-c.c b/mllib/getopt-c.c index bf40f91..3efd5d3 100644 --- a/mllib/getopt-c.c +++ b/mllib/getopt-c.c @@ -69,8 +69,8 @@ cleanup_option_list (void *ptr) static void __attribute__((noreturn))
2016 Jul 13
3
[PATCH v3 1/2] OCaml tools: add and use a Getopt module
...} + + specv = Field (specsv, specv_index); + actionv = Field (specv, 1); + + switch (Tag_val (actionv)) { + int num; + + case 0: /* Unit of (unit -> unit) */ + v = Field (actionv, 0); + do_call1 (v, Val_unit); + break; + + case 1: /* Set of bool ref */ + caml_modify (&Field (Field (actionv, 0), 0), Val_true); + break; + + case 2: /* Clear of bool ref */ + caml_modify (&Field (Field (actionv, 0), 0), Val_false); + break; + + case 3: /* String of string * (string -> unit) */ + v = Field (actionv, 1); + v2 = caml_copy_s...
2016 Jun 24
2
[PATCH] RFC: OCaml tools: add and use a Getopt module
...break; + } + + specv = Field (specsv, specv_index); + actionv = Field (specv, 1); + + switch (Tag_val (actionv)) { + int num; + + case 0: /* Unit of (unit -> unit) */ + do_call1 (Field (actionv, 0), Val_unit); + break; + + case 1: /* Set of bool ref */ + caml_modify (&Field (Field (actionv, 0), 0), Val_true); + break; + + case 2: /* Clear of bool ref */ + caml_modify (&Field (Field (actionv, 0), 0), Val_false); + break; + + case 3: /* String of string * (string -> unit) */ + do_call1 (Field (actionv, 1), caml_copy_string...
2017 Jun 12
32
[PATCH v5 00/32] Refactor utilities, implement some APIs in OCaml.
This is a combination of: https://www.redhat.com/archives/libguestfs/2017-June/msg00046.html [PATCH 00/12] Refactor utility functions. plus: https://www.redhat.com/archives/libguestfs/2017-June/msg00023.html [PATCH v3 00/19] Allow APIs to be implemented in OCaml. with the second patches rebased on top of the utility refactoring, and some other adjustments and extensions. This passes
2017 Jun 15
45
[PATCH v6 00/41] Refactor utilities, reimplement inspection in the daemon.
v5: https://www.redhat.com/archives/libguestfs/2017-June/msg00065.html Since v5, this now implements inspection almost completely for Linux and Windows guests. Rich.