Re: [gtkmm] Glib::ustring bug?



> > Please try data.c_str() before speaking of a bug. I suspect
> > that the string returned by data.raw() is not '\0'-terminated.
> 
> Yes, .c_str() works properly.  However, if .raw() does not return a
> string representation which works with third-party STL add-ons, I think
> a word of warning somewhere in the documentation is appropriate. 

I think you've missed the point about ustring::raw().  It does *not* return
a C style string, so the fact that your code snippet worked under gcc-RH
is simply an accident.  Outputting an unterminated char* to a C++ iostream
is as likely to cause a segfault as anything else, since the stream will 
keep outputting characters until it reaches a null.

cheers,
--
joey yandle                             ___====-_  _-====___
www.divisionbyzero.com            _--~~~#####//      \\#####~~~--_
/jwy/pubkey.asc                _-~##########// (    ) \\##########~-_
                              -############//  :\^^/:  \\############-
                            _~############//   (@::@)   \\############~_
                           ~#############((     \\//     ))#############~
                          -###############\\    (^^)    //###############-
                         -#################\\  / "" \  //#################-
                        -###################\\/      \//###################-
                       _#/:##########/\######(   /\   )######/\##########:\#_
                       :/ :#/\#/\#/\/  \#/\##\  :  :  /##/\#/  \/\#/\#/\#: \:
                       "  :/  V  V  "   V  \#\: :  : :/#/  V   "  V  V  \:  "
                          "   "  "      "   \ : :  : : /   "      "  "   "




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]