Cezar Andrei has proposed merging lp:~zorba-coders/zorba/fread-pdf-trunk into 
lp:zorba.

Requested reviews:
  Chris Hillery (ceejatec)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/fread-pdf-trunk/+merge/125338

Make doc comments for createBaser64Binary more explicit on what parameters they 
expect and what they do.
Change, return value to xs_int for getIntValue() method.
-- 
https://code.launchpad.net/~zorba-coders/zorba/fread-pdf-trunk/+merge/125338
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'cmake_modules/ZorbaModule.cmake'
--- cmake_modules/ZorbaModule.cmake	2012-09-17 00:36:37 +0000
+++ cmake_modules/ZorbaModule.cmake	2012-09-19 20:49:20 +0000
@@ -114,9 +114,20 @@
 #              relative to CMAKE_CURRENT_SOURCE_DIR)
 #       LINK_LIBRARIES - (optional) List of libraries to link external
 #              function library against
+#       CONFIG_FILES - (optional) List of files to configure with package
+#              information; see below
 #       TEST_ONLY - (optional) Module is for testcases only and should not
 #              be installed
 #
+# CONFIG_FILES - any files specific here will be copied to
+# CMAKE_CURRENT_BINARY_DIR using CONFIGURE_FILE(). They may contain
+# the following @VARIABLES@ which will be substituted:
+#       ZORBA_MODULE_RELATIVE_DIR - directory portion of mangled URI
+#       ZORBA_MODULE_LIBFILE_WE - filename (without extension) portion of
+#              mangled URI
+# The input files should have a .in extension. The resulting file in
+# the build directory will have the .in removed.
+#
 # QQQ this currently doesn't support modules with multiple component
 # .xq files. (Neither does Zorba's automatic loading mechanism, so
 # this probably isn't a huge deal, but worth thinking about.)
@@ -125,7 +136,7 @@
 # file enough to deduce the URI and version?
 MACRO (DECLARE_ZORBA_MODULE)
   # Parse and validate arguments
-  PARSE_ARGUMENTS(MODULE "LINK_LIBRARIES;EXTRA_SOURCES"
+  PARSE_ARGUMENTS(MODULE "LINK_LIBRARIES;EXTRA_SOURCES;CONFIG_FILES"
     "URI;FILE;VERSION" "TEST_ONLY" ${ARGN})
   IF (NOT MODULE_FILE)
     MESSAGE (FATAL_ERROR "'FILE' argument is required for ZORBA_DECLARE_MODULE()")
@@ -353,6 +364,20 @@
       "${version_infix}" "" 1 "${MODULE_TEST_ONLY}")
   ENDFOREACH (version_infix)
 
+  # Configure any module-specified config files.
+  SET (ZORBA_MODULE_RELATIVE_DIR ${module_path})
+  SET (ZORBA_MODULE_LIBFILE_WE ${module_filewe})
+  FOREACH (_config_file ${MODULE_CONFIG_FILES})
+    # Strip off .in - can't use GET_FILENAME_COMPONENT as it always removes
+    # the longest possible extension
+    STRING (REGEX REPLACE "\\.in$" "" _config_filename_we "${_config_file}")
+    IF (NOT IS_ABSOLUTE "${_config_file}")
+      SET (_config_file "${CMAKE_CURRENT_SOURCE_DIR}/${_config_file}")
+    ENDIF (NOT IS_ABSOLUTE "${_config_file}")
+    CONFIGURE_FILE (${_config_file}
+      "${CMAKE_CURRENT_BINARY_DIR}/${_config_filename_we}" @ONLY)
+  ENDFOREACH (_config_file)
+
   # Last but not least, whip up a test case that ensures the module
   # can at least be compiled. Don't bother for test-only modules
   # (presumably they're there to be tested!).

=== modified file 'include/zorba/item_factory.h'
--- include/zorba/item_factory.h	2012-09-17 00:36:37 +0000
+++ include/zorba/item_factory.h	2012-09-19 20:49:20 +0000
@@ -123,8 +123,8 @@
       /** \brief Creates a Base64Binary Item
        *         see [http://www.w3.org/TR/xmlschema-2/#base64Binary]
        *
-       * @param aBinData a pointer to the base6c4 binary data.
-       * @param aLength the length of the base64 binary data.
+       * @param aBinData a pointer to the base64 encoded data. The data is copied from aBinData.
+       * @param aLength the length of the base64 encoded data.
        * @return The Base64Binary Item.
        */
       virtual Item
@@ -133,7 +133,7 @@
       /** \brief Creates a Base64Binary Item
        *         see [http://www.w3.org/TR/xmlschema-2/#base64Binary]
        *
-       * @param aStream A stream containing the Base64 encoded data.
+       * @param aStream A stream containing the Base64 encoded data. The data is copied from aStream imediately.
        * @return the Base64Binary Item.
        */
       virtual Item
@@ -142,11 +142,11 @@
       /** \brief Creates a Base64Binary Item
        *         see [http://www.w3.org/TR/xmlschema-2/#base64Binary]
        *
-       * @param aBinData the data in binary form. The data is copied from aBinData.
-       * @param aLength the length of the data
+       * @param aBinData the data in binary form (not encoded). The data is copied from aBinData.
+       * @param aLength the length of the binary data
        * @return the Base64Binary Item.
        */
-      virtual Item 
+      virtual Item
       createBase64Binary(const unsigned char* aBinData, size_t aLength) = 0;
 
       /** \brief Creates a streamable Base64Binary Item
@@ -735,7 +735,7 @@
        * @param aNames A vector containing the name and value of each pair.
        */
       virtual Item createJSONObject(std::vector<std::pair<Item, Item> >& aNames) = 0;
-      
+
       /**
        * Create a JSON Array containing the specified items.
        *

=== modified file 'src/store/naive/atomic_items.h'
--- src/store/naive/atomic_items.h	2012-09-17 00:36:37 +0000
+++ src/store/naive/atomic_items.h	2012-09-19 20:49:20 +0000
@@ -1776,7 +1776,7 @@
   friend class AtomicItem;
 
 protected:
-  int32_t theValue;
+  xs_int theValue;
 
 protected:
   IntItem(xs_int aValue) : theValue(aValue) {}
@@ -1792,7 +1792,7 @@
 
   xs_long getLongValue() const { return static_cast<xs_long>(theValue); }
 
-  int32_t getIntValue() const { return theValue; }
+  xs_int getIntValue() const { return theValue; }
 
   store::SchemaTypeCode getTypeCode() const { return store::XS_INT; }
 

=== modified file 'test/rbkt/modules/CMakeLists.txt'
--- test/rbkt/modules/CMakeLists.txt	2012-09-17 00:36:37 +0000
+++ test/rbkt/modules/CMakeLists.txt	2012-09-19 20:49:20 +0000
@@ -27,9 +27,15 @@
 DECLARE_ZORBA_MODULE(URI "http://zorba-tests.28msec.us/modules/B"; VERSION 1.0
   FILE "${CMAKE_CURRENT_SOURCE_DIR}/module-B.xq" TEST_ONLY)
 
-DECLARE_ZORBA_MODULE(URI "http://zorba-tests.28msec.us/modules/ext";
-  VERSION 2.0 FILE "ext2.xq" TEST_ONLY)
-DECLARE_ZORBA_MODULE(URI "http://zorba-tests.28msec.us/modules/ext";
+#DECLARE_ZORBA_MODULE(URI "http://zorba-tests.28msec.us/modules/ext";
+#  VERSION 2.0 FILE "ext2.xq" TEST_ONLY)
+#DECLARE_ZORBA_MODULE(URI "http://zorba-tests.28msec.us/modules/ext";
+#  VERSION 1.0 FILE "ext.xq" TEST_ONLY)
+
+# This one also has a CONFIG_FILE
+DECLARE_ZORBA_MODULE(URI "http://www.zorba-xquery.com/modules/ext";
+  VERSION 2.0 FILE "ext2.xq" TEST_ONLY CONFIG_FILES ext2_config.txt.in)
+DECLARE_ZORBA_MODULE(URI "http://www.zorba-xquery.com/modules/ext";
   VERSION 1.0 FILE "ext.xq" TEST_ONLY)
 
 ADD_SUBDIRECTORY(ourlib)

=== added file 'test/rbkt/modules/ext2_config.txt.in'
--- test/rbkt/modules/ext2_config.txt.in	1970-01-01 00:00:00 +0000
+++ test/rbkt/modules/ext2_config.txt.in	2012-09-19 20:49:20 +0000
@@ -0,0 +1,1 @@
+This is a test: "@ZORBA_MODULE_RELATIVE_DIR@" "@ZORBA_MODULE_LIBFILE_WE@"

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to