~ubuntu-branches/ubuntu/precise/libxml++2.6/precise

« back to all changes in this revision

Viewing changes to libxml++/document.cc

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2005-03-13 15:46:33 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050313154633-iubyqdtu6y3p8915
Tags: 2.10.0-0ubuntu2
added doxygen to the build-depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
306
306
    throw exception("do_write_to_string() failed.");
307
307
 
308
308
  // Create a Glib::ustring copy of the buffer
309
 
  Glib::ustring result((char*)buffer, length);
 
309
 
 
310
  // Here we force the use of Glib::ustring::ustring( InputIterator begin, InputIterator end )
 
311
  // instead of Glib::ustring::ustring( const char*, size_type ) because it
 
312
  // expects the length of the string in characters, not in bytes.
 
313
  Glib::ustring result( reinterpret_cast<const char *>(buffer), reinterpret_cast<const char *>(buffer + length) );
 
314
 
310
315
  // Deletes the original buffer
311
316
  xmlFree(buffer);
312
317
  // Return a copy of the string