Re: [Qemu-devel] [Question] About object oriented programming in qemu

2018-10-30 Thread Paolo Bonzini
On 30/10/2018 17:08, Li Qiang wrote: > Hello all, > >   > > Today I read the BusClass’ definition. > >   > > The comment > > /* FIXME first arg should be BusState */ > > remind me that OOP in qemu is not very OOP. It is not "not very OOP", it is not language-supported and so it can take a

[Qemu-devel] [Question] About object oriented programming in qemu

2018-10-30 Thread Li Qiang
Hello all, Today I read the BusClass’ definition. The comment /* FIXME first arg should be BusState */ remind me that OOP in qemu is not very OOP. Maybe we should take the first arg as the Object pointer, just as the cpp’s this pointer. For example, we can define the BusClass function as