qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 11/22] qapi: add signal support to core QMP serv


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 11/22] qapi: add signal support to core QMP server
Date: Mon, 7 Mar 2011 14:36:13 +0000

On Mon, Mar 7, 2011 at 1:53 PM, Anthony Liguori <address@hidden> wrote:
> On 03/07/2011 07:21 AM, Stefan Hajnoczi wrote:
>>
>> On Mon, Mar 7, 2011 at 1:22 AM, Anthony Liguori<address@hidden>
>>  wrote:
>>
>>>
>>> diff --git a/qmp-core.h b/qmp-core.h
>>> index e3235ec..5ce02f7 100644
>>> --- a/qmp-core.h
>>> +++ b/qmp-core.h
>>> @@ -21,10 +21,65 @@ typedef struct QmpState QmpState;
>>>  typedef void (QmpCommandFunc)(const QDict *, QObject **, Error **);
>>>  typedef void (QmpStatefulCommandFunc)(QmpState *qmp__sess, const QDict
>>> *, QObject **, Error **);
>>>
>>> +typedef struct QmpSlot
>>> +{
>>> +    int handle;
>>> +    void *func;
>>>
>>
>> This should be a void (*func)()
>
> Technically void (*)() is an obsolete type in standard C.
>
> I can switch to void (*)(void) but it requires casting and requires a
> typeof() :-/

You're right, void (*)(void) is the proper form for a general function
pointer.  I think doing this in a portable way is worthwhile.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]