]> xenbits.xensource.com Git - people/liuw/xen.git/commitdiff
golang/xenlight: define EvLink builtin as empty struct
authorNick Rosbrook <rosbrookn@ainfosec.com>
Mon, 16 Dec 2019 18:08:05 +0000 (18:08 +0000)
committerGeorge Dunlap <george.dunlap@citrix.com>
Mon, 16 Dec 2019 18:08:05 +0000 (18:08 +0000)
Define EvLink as empty struct as there is currently no reason the internal of
this type should be used in Go.

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 6c3868cd69af211dfbd63ccee6740473423d473c..c1d9fe85fd021d7284c6c44f6a284e8f3c081823 100644 (file)
@@ -235,6 +235,16 @@ func (mvg *MsVmGenid) toC() (C.libxl_ms_vm_genid, error) {
        return cmvg, nil
 }
 
+// EvLink represents a libxl_ev_link.
+//
+// Represented as an empty struct for now, as there is no
+// apparent need for the internals of this type to be exposed
+// through the Go package.
+type EvLink struct{}
+
+func (el *EvLink) fromC(cel *C.libxl_ev_link) error      { return nil }
+func (el *EvLink) toC() (cel C.libxl_ev_link, err error) { return }
+
 type Context struct {
        ctx    *C.libxl_ctx
        logger *C.xentoollog_logger_stdiostream