On Wed, Jul 22, 2009 at 04:56:53PM +0900, Nguyen Anh Quynh wrote: > On Wed, Jul 22, 2009 at 4:44 PM, Daniel Veillard<veillard@xxxxxxxxxx> wrote: > > On Wed, Jul 22, 2009 at 04:27:45PM +0900, Nguyen Anh Quynh wrote: > >> On Wed, Jul 22, 2009 at 4:19 PM, Nguyen Anh Quynh<aquynh@xxxxxxxxx> wrote: > >> Acutally, to avoid all those ugly sanity checks, it is best to define > > > > S/ugly/sane/ > > > >> VIR_MEMORY_* as an enum type, then redefine virDomainMemoryCheck() as > >> (note the last param is changed): > >> > >> int virDomainMemoryPeek (virDomainPtr dom, > >> unsigned long long start, > >> size_t size, > >> void *buffer, > >> enum virDomainMemoryFlags flags); > >> > > > > That is ugly, it's also wrong, it break API and ABI compatibility, > > forget about it ! > > > >> Let me know your idea about this. > > > > If more C was implemented with defensive programming, and if people > > didn't broke API every time they think "it would be nicer" then it > > would be way easier to actually develop in C ! Please change your > > mindset that just doesn't work in the long term, sorry ... > > Please take this new patch. ACK, looks reasonable. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list