why no const in char* arguments?



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]