Support Auto lists (and containers in general) with simple pointers (such as char*)
This something I was mentioning in !413 (merged), right now it's impossible to define something like:
g_autolist(char) my_list = g_list_prepend (NULL, g_strdup ("foo"));
Now, this would be easily done if we'd define by default things like:
G_DEFINE_AUTOPTR_CLEANUP_FUNC(char, free) G_DEFINE_AUTOPTR_CLEANUP_FUNC(gchar, g_free) ... /* And this for all the basic types which we care about */
However, this would also make possible then to use
g_autoptr(char) foo = NULL, which I don't see it wrong per se (actually I think it makes things cleaner instead of having different syntax for
g_autofree stuff), but I guess it's something outside the scope of
So, if we only care about this for containers,
_GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS could be split so that we've also a public
G_DEFINE_AUTO_CONTAINERS_CLEANUP_FUNC (say, I'm bad with wording :)) which does this only for container types.
So, here for discussing... For sure projects could have their typedefs for char, and use those when they want it, but I think glib should provide these by default for standard types.