[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] Go along with glib's basic type typedef sill
From: |
Blue Swirl |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] Go along with glib's basic type typedef silliness? |
Date: |
Sat, 19 Jan 2013 09:13:09 +0000 |
On Fri, Jan 18, 2013 at 3:36 PM, Markus Armbruster <address@hidden> wrote:
> Blue Swirl <address@hidden> writes:
>
>> On Mon, Jan 14, 2013 at 7:01 PM, Markus Armbruster <address@hidden> wrote:
>>> [Thread hijack, dropping cc: qemu-trivial, qemu-ppc]
>>>
>>> Andreas Färber <address@hidden> writes:
>>>
>>>> Am 14.01.2013 13:19, schrieb Markus Armbruster:
>>>>> Andreas Färber <address@hidden> writes:
>>> [...]
>>>>>> diff --git a/qom/object.c b/qom/object.c
>>>>>> index 351b88c..03e6f24 100644
>>>>>> --- a/qom/object.c
>>>>>> +++ b/qom/object.c
>>>>>> @@ -1017,7 +1017,7 @@ gchar *object_get_canonical_path(Object *obj)
>>>>>> return newpath;
>>>>>> }
>>>>>>
>>>>>> -Object *object_resolve_path_component(Object *parent, gchar *part)
>>>>>> +Object *object_resolve_path_component(Object *parent, const gchar *part)
>>>>>> {
>>>>>> ObjectProperty *prop = object_property_find(parent, part, NULL);
>>>>>> if (prop == NULL) {
>>>>>
>>>>> Unrelated: do we really want to go along with glib's basic type typedef
>>>>> silliness?
>>>>
>>>> Elsewhere I have adopted the exact GLib signature since typedefs can be
>>>> changed at any time. In particular the GCompareFunc using gconstpointer,
>>>> gint, etc. Not saying I find their GLib usage useful.
>>>
>>> No, these typedefs cannot be changed.
>>>
>>> Firstly, their exact definitions are documented[*], therefore can be
>>> relied on.
>>>
>>> Secondly, mountains of code rely on the exact definitions, and would
>>> break left and right if they were changed.
>>>
>>> They're a textbook example of a perfectly useless pseudo-abstraction.
>>
>> CONST, WORD, PWORD, DWORD, FLOAT etc. in a certain platform...
>
> MY EYES, MY EYES, WHAT DID YOU DO TO MY EYES!!!
Leishmaniasis Capslockititis Fenestrae? :-D
>
> [...]
- [Qemu-ppc] [RFC ppc-next v3 00/10] target-ppc: MacIO QOM'ification, Andreas Färber, 2013/01/13
- [Qemu-ppc] [RFC ppc-next v3 06/10] mac_nvram: Clean up public API, Andreas Färber, 2013/01/13
- [Qemu-ppc] [PATCH 01/10] qom: Make object_resolve_path_component() path argument const, Andreas Färber, 2013/01/13
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 01/10] qom: Make object_resolve_path_component() path argument const, Markus Armbruster, 2013/01/14
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 01/10] qom: Make object_resolve_path_component() path argument const, Andreas Färber, 2013/01/14
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 01/10] qom: Make object_resolve_path_component() path argument const, Markus Armbruster, 2013/01/14
- [Qemu-ppc] Go along with glib's basic type typedef silliness? (was: [Qemu-devel] [PATCH 01/10] qom: Make object_resolve_path_component() path argument const), Markus Armbruster, 2013/01/14
- Re: [Qemu-ppc] [Qemu-devel] Go along with glib's basic type typedef silliness? (was: [PATCH 01/10] qom: Make object_resolve_path_component() path argument const), Blue Swirl, 2013/01/17
- Re: [Qemu-ppc] [Qemu-devel] Go along with glib's basic type typedef silliness?, Markus Armbruster, 2013/01/18
- Re: [Qemu-ppc] [Qemu-devel] Go along with glib's basic type typedef silliness?,
Blue Swirl <=
[Qemu-ppc] [RFC ppc-next v3 04/10] macio: Delay qdev init until all fields are initialized, Andreas Färber, 2013/01/13
[Qemu-ppc] [RFC ppc-next v3 07/10] mac_nvram: Mark as Big Endian, Andreas Färber, 2013/01/13
[Qemu-ppc] [RFC ppc-next v3 08/10] mac_nvram: QOM'ify MacIO NVRAM, Andreas Färber, 2013/01/13
[Qemu-ppc] [RFC ppc-next v3 03/10] macio: QOM'ify some more, Andreas Färber, 2013/01/13
[Qemu-ppc] [RFC ppc-next v3 05/10] macio: Split MacIO in two, Andreas Färber, 2013/01/13
[Qemu-ppc] [RFC ppc-next v3 09/10] ide/macio: QOM'ify MacIO IDE, Andreas Färber, 2013/01/13
[Qemu-ppc] [RFC ppc-next v3 02/10] ppc: Move Mac machines to hw/ppc/, Andreas Färber, 2013/01/13