[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH] hivex: add hivex_set_value api call and perl bindings, tests



On Sat, Jul 03, 2010 at 12:03:42PM -0700, Conrad Meyer wrote:
> +  "node_set_value", (RErr, [AHive; ANode "node"; ASetValue; AUnusedFlags]),

I think you're creating a lot of additional complexity for yourself
here by creating a new ASetValue hash type with 3 fields.  Instead you
could add just an int32 type to the generator (far simpler to
implement) and write this call as:

"node_set_value", (RErr, [AHive; ANode "node";
       AString "key"; AInt32 "t"; AString "val"; AUnusedFlags]),

Note it needs to be explicitly an int32 type because in OCaml on 32
bit architectures ints are 31 bits wide.

> +    "set a single (key, value) pair at a given node",
> +    "\
> +This call can be used to set a single (key, value) pair
> +stored in C<node>.

Here, say:

  This call can be used to replace a single (key, value) pair
  stored in C<node>.  If the key does not already exist, then
  a new key is added.  Key matching is case insensitive.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]