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

[libvirt] [go PATCH 0/8] Refactor the way typed parameters are handled



Go 1.12 breaks our current typed parameter handling as it appears to be
deciding some various are no longer live & free'ing them. Mixing go
allocated memory with C API calls often trips with this kind of thing.
This series thus changes the code to use C allocated memory for typed
parameter arrays and use the libvirt APIs where possible.

I'm not sure if anyone on list feels like reviewing this Go code or not.
Most of the time I've just pushed Go changes directly, but I figure putting
it out for review might help people spread the knowledge of the Go
bindings

Daniel P. Berrangé (8):
  Fix GetGuestVcpus to actually return some data
  Add missing error reporting when setting typed parameters
  Change typedParamsPackNew to use a C allocated array
  Switch typedParamsUnpackLen to use accessor methods
  Use 'cnparams' for virTypedParameters array length variables
  Simplify setting of typed parameters
  Switch remaining typed parameter code to use C allocs
  Rename typedParamsUnpackLen to typedParamsUnpack

 connect.go             |  81 ++++----
 domain.go              | 429 +++++++++++++++++------------------------
 domain_events.go       |  20 +-
 typedparams.go         | 295 ++++++++++++----------------
 typedparams_test.go    |   8 +-
 typedparams_wrapper.go | 240 +++++++++++++++++++++++
 typedparams_wrapper.h  | 126 ++++++++++++
 7 files changed, 721 insertions(+), 478 deletions(-)
 create mode 100644 typedparams_wrapper.go
 create mode 100644 typedparams_wrapper.h

-- 
2.20.1


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