On Tue, Jun 09, 2020 at 12:09:54 +0100, Alex Bennée wrote:
> How about a g_intern_string() as a non-freeable const char that can also
> be treated as canonical?
I like it. Didn't know about g_intern_string (I see it's
implemented as an append-only hash table protected by a lock).
Cheers,
Emilio G. Cota writes:
> On Mon, Jun 08, 2020 at 09:06:17 +0100, Alex Bennée wrote:
>> Emilio G. Cota writes:
>> > I'd rather use asprintf(3) and strdup(3) here, so that plugins don't
>> > have to worry about glib, and on the QEMU side we don't have to worry
>> > about plugins calling free() i
On Mon, Jun 08, 2020 at 09:06:17 +0100, Alex Bennée wrote:
> Emilio G. Cota writes:
> > I'd rather use asprintf(3) and strdup(3) here, so that plugins don't
> > have to worry about glib, and on the QEMU side we don't have to worry
> > about plugins calling free() instead of g_free().
>
> AFAIK yo
Emilio G. Cota writes:
> On Tue, Jun 02, 2020 at 16:46:22 +0100, Alex Bennée wrote:
>> This may well end up being anonymous but it should always be unique.
>>
>> Signed-off-by: Alex Bennée
>> ---
>> include/qemu/qemu-plugin.h | 5 +
>> plugins/api.c | 18 ++
On 6/8/20 5:45 AM, Emilio G. Cota wrote:
> On Tue, Jun 02, 2020 at 16:46:22 +0100, Alex Bennée wrote:
>> This may well end up being anonymous but it should always be unique.
>>
>> Signed-off-by: Alex Bennée
>> ---
>> include/qemu/qemu-plugin.h | 5 +
>> plugins/api.c | 18
On Tue, Jun 02, 2020 at 16:46:22 +0100, Alex Bennée wrote:
> This may well end up being anonymous but it should always be unique.
>
> Signed-off-by: Alex Bennée
> ---
> include/qemu/qemu-plugin.h | 5 +
> plugins/api.c | 18 ++
> 2 files changed, 23 insertions(+
On 6/2/20 5:46 PM, Alex Bennée wrote:
This may well end up being anonymous but it should always be unique.
Signed-off-by: Alex Bennée
---
include/qemu/qemu-plugin.h | 5 +
plugins/api.c | 18 ++
2 files changed, 23 insertions(+)
diff --git a/include/qem
This may well end up being anonymous but it should always be unique.
Signed-off-by: Alex Bennée
---
include/qemu/qemu-plugin.h | 5 +
plugins/api.c | 18 ++
2 files changed, 23 insertions(+)
diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h
i