Re: GHashTable and const
- From: "Andrew W. Nosenko" <andrew w nosenko gmail com>
- To: "Havoc Pennington" <hp pobox com>
- Cc: gtk-devel-list gnome org
- Subject: Re: GHashTable and const
- Date: Thu, 10 Jul 2008 13:10:57 +0300
On Thu, Jul 3, 2008 at 5:50 PM, Havoc Pennington <hp pobox com> wrote:
> On Thu, Jul 3, 2008 at 9:49 AM, Alberto Mardegan
> <mardy users sourceforge net> wrote:
>> If I proposed a patch which adds some "const" here and there, would that be
>> discarded a priori, or would it undergo a serious consideration?
> I'm not a GTK maintainer, but one problem with this is backward
> compatibility. Adding const can certainly break previously-working
> code, especially C++ code.
Sorry for long delay, but could you please explain, how changing from
g_hash_table_size (GHashTable *hash_table);
g_hash_table_size (const GHashTable *hash_table);
would to break any C++ code? It would to make some bunch of
const_cast<> unneeded and noop -- yes. But break... hard to imagine.
Plase, pay attention that I say about (1) functions that don't modify
object's state, and (2) receive "just pointer", not ther
Andrew W. Nosenko <andrew w nosenko gmail com>
] [Thread Prev