why no const in char* arguments?
- From: Philip L Dawes <P L Dawes-CSSE94 cs bham ac uk>
- To: gtk-list redhat com
- Subject: why no const in char* arguments?
- Date: Sat, 26 Jul 1997 19:22:37 +0100 (BST)
Is there any reason for the lack of 'const' in the char* arguments of
gtklabel and gtkbutton widget functions?
This is a bit annoying for us C++ people who use ansi string objects to
pass around character strings (which convert to const char*'s) since we
have to use a const_cast<char*> for each argument.
>From what I can tell from the source, the char strings are copied
with g_strdup (which takes a const char* anyway!) and not modified.
Seeing as the change would not break any existing code, is there any
reason not to do it?
Cheers,
Phil
_______________________________________________________________________
Phil Dawes
102 South Park Road WWW: http://www.cs.bham.ac.uk/~pld
Ilford, Email: P.L.Dawes-CSSE94@cs.bham.ac.uk
Essex IG1 1SZ
_______________________________________________________________________
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]