Hi there and a happy new year! I have a question regarding your comments. 
Basic C types (pointers and const qualifiers) are read from right to left, with 
the exception that the the first two components can be exchanged if one is 
`const`. Hence:

char *: mutable pointer to mutable chars
const char *: mutable pointer to const chars (read-only view into any string)
char const*: same as ^
const char * const: const pointer to const chars (read-only view into a fixed 
string)
const char * const: same as ^

So I'm reading `g_autofree const char *leases_str = NULL;` as:

`leases_str` offers read-only view into any string, and frees what is behind 
this pointer once it goes out of scope.

So how can `g_autofree const char *leases_str = NULL;` be a problem? I'd only 
see `g_autofree const char * const leases_str = NULL;` to be problematic, which 
we clearly do not have here.

My C may be a bit..rusty and I'm not familiar in libvirt coding conventions, so 
I might be missing something?

Reply via email to