[gdome]Buffered additions



Hello,

This time I'll wait a little bit before sending the messages, to buffer
comments up before sending.  I promise! :-)

 - Since DOMString::toC() result has to be deallocated by the caller, it
   should be clearly stated that this (tempting) statement leads to
   memory leak:
   printf("Node value: %s\n", node.get_nodeValue().toC());
 
 - The documentation talks about a c_str() method, but it does not seem
   to exist.

 - Not being able to use DOMStrings in printf-like format strings is
   quite a PITA when you write lots of debugging messages.

 - char* buf = str.toUTF8(len);  cannot be done happily:
   BSTypes.cc:21: initialization to `char *' from `Char8 *' changes signedness
   However, the only method that return the char* that can be used with
   all the text-processing functions usually available is toC, that
   seems to involve latin1 conversion.

However, good news: now that I switched to toUTF8() and corrected all
these memory leaks, my program is doing fine.

Bye, Enrico


--
GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini <enrico debian org>



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