[531] in The GTK GIMP ToolKit mailing list archive
[gtk-list] why no const in char* arguments?
daemon@ATHENA.MIT.EDU (Philip L Dawes)
Sat Jul 26 14:25:09 1997
Date: Sat, 26 Jul 1997 19:22:37 +0100 (BST)
From: Philip L Dawes <P.L.Dawes-CSSE94@cs.bham.ac.uk>
To: gtk-list@redhat.com
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com
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
_______________________________________________________________________
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null