qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/6] libqblock public type defines


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 2/6] libqblock public type defines
Date: Tue, 04 Sep 2012 09:38:21 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0

Il 04/09/2012 09:19, Wenchao Xia ha scritto:
>>>
>>> +struct QBlockOption_prot_file {
>>
>> QBlockOptionProtFile
>>
>>> +    char *filename;
>>
>> 'const'
>>
>   There is a problem, this member would be used in information
> retrieving, so it will be set to a pointer to a string allocated
> at runtime, and later be freed. I am not sure if const fits for this
> situation, let me check.

No, const would add useless complication.  In C++ it is different
because you have constructors.

Paolo



reply via email to

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