]> xenbits.xensource.com Git - xcp/xen-api-libs.git/commit
[rpc-light] when (un)marshaling variant, if it has no arguments then consider it...
authorThomas Gazagnaire <thomas.gazagnaire@eu.citrix.com>
Mon, 11 Jan 2010 17:44:38 +0000 (17:44 +0000)
committerThomas Gazagnaire <thomas.gazagnaire@eu.citrix.com>
Mon, 11 Jan 2010 17:44:38 +0000 (17:44 +0000)
commit8db9ebff77db0b40c4606d47db1397ecf8c28bd5
tree683888d5929f5809e0bb03d2d93eb6504508c808
parent6a32c2cf5b98e7882c459da2f9f92d8b28bffe82
[rpc-light] when (un)marshaling variant, if it has no arguments then consider it as a string.

This bit is also necessary to discuss with the SM backend.
Basically, if you have 'type t = Foo | Bar of int with rpc' you will consider than the value Foo is actually the same thing as the string "Foo" (if you don't want to have a capital letter, use polymorphic variants as 'type t = [ `foo | `bar of int ]' which will give that the value `foo will be considered as the string "foo").

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
rpc-light/examples/Makefile
rpc-light/examples/variants.ml [new file with mode: 0644]
rpc-light/examples/xapi.ml
rpc-light/p4_rpc.ml
rpc-light/run_test [new file with mode: 0644]