← Back to team overview

zorba-coders team mailing list archive

[Merge] lp:~paul-lucas/zorba/bug-1056924 into lp:zorba

 

Paul J. Lucas has proposed merging lp:~paul-lucas/zorba/bug-1056924 into lp:zorba.

Commit message:
Fixed documentation.

Requested reviews:
  Paul J. Lucas (paul-lucas)
Related bugs:
  Bug #1056924 in Zorba: "Multiple encodings are not documents in file and base64 modules"
  https://bugs.launchpad.net/zorba/+bug/1056924

For more details, see:
https://code.launchpad.net/~paul-lucas/zorba/bug-1056924/+merge/146698

Fixed documentation.
-- 
https://code.launchpad.net/~paul-lucas/zorba/bug-1056924/+merge/146698
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'modules/org/expath/ns/file.xq'
--- modules/org/expath/ns/file.xq	2012-09-19 21:16:15 +0000
+++ modules/org/expath/ns/file.xq	2013-02-05 18:38:22 +0000
@@ -363,8 +363,9 @@
  : Reads the content of a file using the specified encoding and returns a
  : string representation of the content.
  :
- : In Zorba only the following encodings are currently supported: "UTF-8",
- : "UTF8". The encoding parameter is case insensitive.
+ : If compiled with ICU, then Zorba supports any encoding that ICU supports;
+ : otherwise Zorba only supports ASCII and UTF-8.
+ : The encoding parameter is case insensitive.
  :
  : @param $file The file to read.
  : @param $encoding The encoding used when reading the file.
@@ -408,8 +409,9 @@
  : trimmed as well. This implementation will uniformly treat LF and CRLF as
  : line separators.
  :
- : In Zorba only the following encodings are currently supported: "UTF-8",
- : "UTF8". The encoding parameter is case insensitive.
+ : If compiled with ICU, then Zorba supports any encoding that ICU supports;
+ : otherwise Zorba only supports ASCII and UTF-8.
+ : The encoding parameter is case insensitive.
  :
  : @param $file The file to read.
  : @param $encoding The encoding used when reading the file.

=== modified file 'modules/org/expath/ns/file.xq.src/file.cpp'
--- modules/org/expath/ns/file.xq.src/file.cpp	2012-12-27 03:02:39 +0000
+++ modules/org/expath/ns/file.xq.src/file.cpp	2013-02-05 18:38:22 +0000
@@ -205,7 +205,7 @@
   {
     try {
       lInStream.reset( new transcode::stream<std::ifstream>(lEncoding.c_str()) );
-    } catch (std::invalid_argument const& e)
+    } catch (std::invalid_argument const&)
     {
       raiseFileError("FOFL0006", "Unsupported encoding", lEncoding.c_str());
     }

=== modified file 'modules/org/expath/ns/file.xq.src/file_module.cpp'
--- modules/org/expath/ns/file.xq.src/file_module.cpp	2012-09-19 21:16:15 +0000
+++ modules/org/expath/ns/file.xq.src/file_module.cpp	2013-02-05 18:38:22 +0000
@@ -88,10 +88,11 @@
 void
 FileModule::destroy()
 {
-  if (!dynamic_cast<FileModule*>(this)) {
-    return;
+  if (dynamic_cast<FileModule*>(this)) {
+    delete this;
   }
-  delete this;
 }
 
-} /* namespace filemodule */ } /* namespace zorba */
+} // namespace filemodule
+} // namespace zorba
+/* vim:set et sw=2 ts=2: */


Follow ups