Re: [libvirt] [PATCH 7/9] virobject: Introduce VIR_CLASS_NEW() macro

2018-04-16 Thread Michal Privoznik
On 04/16/2018 11:52 AM, Erik Skultety wrote: > On Fri, Apr 13, 2018 at 04:47:14PM +0200, Michal Privoznik wrote: >> So far we are repeating the following lines over and over: >> >> virClassNew(virClassForObject(), >> "virSomeObject", >> sizeof(virSomeObject), >>

Re: [libvirt] [PATCH 7/9] virobject: Introduce VIR_CLASS_NEW() macro

2018-04-16 Thread Erik Skultety
On Fri, Apr 13, 2018 at 04:47:14PM +0200, Michal Privoznik wrote: > So far we are repeating the following lines over and over: > > virClassNew(virClassForObject(), > "virSomeObject", > sizeof(virSomeObject), > virSomeObjectDispose); > > While this works,

Re: [libvirt] [PATCH 7/9] virobject: Introduce VIR_CLASS_NEW() macro

2018-04-16 Thread Erik Skultety
On Fri, Apr 13, 2018 at 04:47:14PM +0200, Michal Privoznik wrote: > So far we are repeating the following lines over and over: > > virClassNew(virClassForObject(), > "virSomeObject", > sizeof(virSomeObject), > virSomeObjectDispose); > > While this works,

[libvirt] [PATCH 7/9] virobject: Introduce VIR_CLASS_NEW() macro

2018-04-13 Thread Michal Privoznik
So far we are repeating the following lines over and over: virClassNew(virClassForObject(), "virSomeObject", sizeof(virSomeObject), virSomeObjectDispose); While this works, it is impossible to do some checking. Firstly, the class name (the 2nd