Further notes about gmetadom string conversions
Enrico Zini <[email protected]> Sat, 27 Jul 2002 18:37:26 +0200
| Newsgroups | gmane.comp.gnome.gdome |
|---|---|
| Message-ID | <[email protected]> |
Hello, A couple other things I would have liked to be somehow documented: - You must free the result of a DOMString::to<whatever> function - What is the unsigned parameter to DOMString::toU* functions and what its use is (since UTF8 strings can be null-terminated, I would not expect a need to pass a by-reference `length' parameter to toUTF8(), given that toC() does not require it). Then, to encourage the use of DOMStrings instead of std::string, at least a comparison operator would be handy, since it would allow to use DOMStrings with std::set, std::map and other sorted containers. IMHO however, forcing people using gmetadom to replace std::string with DOMString is bad. Last, since all the to* functions need the invoker to deallocate the result, something to directly convert DOMStrings to std::strings, that, contrary to C strings, do memory management properly, is strongly wanted. Bye, Enrico -- GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini <[email protected]>