[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 4/7] qom: add object_new_propv / object_new_p
Re: [Qemu-devel] [PATCH v3 4/7] qom: add object_new_propv / object_new_proplist constructors
Fri, 08 May 2015 14:16:31 -0600
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0
On 05/08/2015 11:10 AM, Andreas Färber wrote:
> Hi Daniel/Paolo,
> Am 01.05.2015 um 12:30 schrieb Daniel P. Berrange:
>> It is reasonably common to want to create an object, set a
>> number of properties, register it in the hierarchy and then
>> mark it as complete (if a user creatable type). This requires
>> quite a lot of error prone, verbose, boilerplate code to achieve.
>> + object_unref(OBJECT(obj));
>> + return obj;
>> + error:
> Intentionally indented?
Yes. Emacs c-mode defaults to indenting like this on purpose, in order
to leave column 1 reserved for the start of a function. Besides, things
like 'diff -p' search for content in column 1, and if top-level labels
are not indented to column 2, then they get interpreted as function
names, making the diff a bit less useful.
Libvirt has gone one step further and enforces this indentation style
during its 'make syntax-check'; I'm sure if we wanted to do likewise in
qemu, we could patch scripts/checkpatch.pl to enforce a particular
style. But right now, I'm personally okay with not worrying about it.
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
Description: OpenPGP digital signature
[Qemu-devel] [PATCH v3 5/7] qom: make enum string tables const-correct, Daniel P. Berrange, 2015/05/01
[Qemu-devel] [PATCH v3 6/7] qom: add a object_property_add_enum helper method, Daniel P. Berrange, 2015/05/01
[Qemu-devel] [PATCH v3 7/7] qom: don't pass string table to object_get_enum method, Daniel P. Berrange, 2015/05/01
Re: [Qemu-devel] [PATCH v3 0/7] qom: misc fixes & enhancements to support TLS work, Paolo Bonzini, 2015/05/05