Abuse of 'const' ?
- From: John Emmas <johne53 tiscali co uk>
- To: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Abuse of 'const' ?
- Date: Mon, 08 Apr 2013 09:44:18 +0100
Occasionally, I've noticed a couple of things like this when building Glib:-
// glib/gvariant.h
GLIB_AVAILABLE_IN_ALL
const gchar **g_variant_get_bytestring_array (GVariant *value, gsize
*length);
// glib/gvariant.c
static gpointer
g_variant_valist_get_nnp (const gchar **str, GVariant *value)
{
// some stuff
return g_variant_get_bytestring_array (value, NULL);
}
This has the effect of converting const** into non-const gpointer. Is it
worth reporting this kind of thing in bugzilla?
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]