]> xenbits.xensource.com Git - xen.git/commitdiff
golang/xenlight: define KeyValueList as empty struct
authorNick Rosbrook <rosbrookn@ainfosec.com>
Mon, 16 Dec 2019 18:08:01 +0000 (18:08 +0000)
committerGeorge Dunlap <george.dunlap@citrix.com>
Mon, 16 Dec 2019 18:08:01 +0000 (18:08 +0000)
Define KeyValueList as empty struct as there is currently no reason for
this type to be available in the Go package.

Implement fromC and toC functions as no-ops.

Signed-off-by: Nick Rosbrook <rosbrookn@ainfosec.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
tools/golang/xenlight/xenlight.go

index 8ac26e63f0842e4253ad79054c4ae2c76a5a21fb..3edff1847154440c9edf3750a18c872d3198ca7a 100644 (file)
@@ -202,6 +202,16 @@ func (chwcap C.libxl_hwcap) toGo() (ghwcap Hwcap) {
        return
 }
 
+// KeyValueList represents a libxl_key_value_list.
+//
+// Represented as an empty struct for now, as there is no
+// apparent need for this type to be exposed through the
+// Go package.
+type KeyValueList struct{}
+
+func (kvl KeyValueList) fromC(ckvl *C.libxl_key_value_list) error      { return nil }
+func (kvl KeyValueList) toC() (ckvl C.libxl_key_value_list, err error) { return }
+
 // typedef struct {
 //     uint32_t size;          /* number of bytes in map */
 //     uint8_t *map;