[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-archiver into lp:zorba

2013-10-02 Thread Zorba Build Bot
Validation queue starting for the following merge proposals:
https://code.launchpad.net/~zorba-coders/zorba/bug-archiver/+merge/187699

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-archiver/+merge/187699
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
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


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-archiver into lp:zorba

2013-10-02 Thread Zorba Build Bot
Validation queue result for 
https://code.launchpad.net/~zorba-coders/zorba/bug-archiver/+merge/187699

Stage TestZorbaUbuntu failed.
1 tests failed (8560 total tests run).

Check test results at 
http://jenkins.lambda.nu/job/TestZorbaUbuntu/347/testReport/ to view the 
results.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-archiver/+merge/187699
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
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


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-archiver into lp:zorba

2013-10-02 Thread Zorba Build Bot
Validation queue starting for the following merge proposals:
https://code.launchpad.net/~zorba-coders/zorba/bug-archiver/+merge/187699

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-archiver/+merge/187699
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
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


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-archiver into lp:zorba

2013-10-02 Thread Zorba Build Bot
Validation queue succeeded - proposal merged!
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-archiver/+merge/187699
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
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


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-archiver into lp:zorba

2013-10-02 Thread noreply
The proposal to merge lp:~zorba-coders/zorba/bug-archiver into lp:zorba has 
been updated.

Status: Approved = Merged

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-archiver/+merge/187699
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-archiver/+merge/187699
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
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


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-archiver into lp:zorba

2013-09-26 Thread Markos Zaharioudakis
Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/bug-archiver 
into lp:zorba.

Commit message:
1. Fixed plan serializer bug: no more only_for_eval fields
2. invoke() can also be used to invoke function items. 


Requested reviews:
  Markos Zaharioudakis (markos-za)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-archiver/+merge/187699

1. Fixed plan serializer bug: no more only_for_eval fields
2. invoke() can also be used to invoke function items. 
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-archiver/+merge/187699
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'modules/zorba-query/zorba-query.xq'
--- modules/zorba-query/zorba-query.xq	2013-08-14 06:22:00 +
+++ modules/zorba-query/zorba-query.xq	2013-09-26 09:43:49 +
@@ -456,12 +456,3 @@
 declare function zq:load-from-query-plan($plan as xs:base64Binary,
   $resolver as item()?, $mapper as item()?) as xs:anyURI external;
 
-(:~
- : pInternal helper function. Only necessary because of incomplete HOF
- : support in Zorba./p
- :)
-declare %private function zq:hof-invoker($hof as item(),
-  $ns as xs:string, $entity as xs:string) as item()*
-{
-   $hof($ns, $entity)
-};

=== modified file 'modules/zorba-query/zorba-query.xq.src/zorba-query.cpp'
--- modules/zorba-query/zorba-query.xq.src/zorba-query.cpp	2013-09-19 20:47:26 +
+++ modules/zorba-query/zorba-query.xq.src/zorba-query.cpp	2013-09-26 09:43:49 +
@@ -22,8 +22,8 @@
 /***
 
 /
-zorba::ExternalFunction*
-ZorbaQueryModule::getExternalFunction(const zorba::String localName)
+zorba::ExternalFunction* ZorbaQueryModule::getExternalFunction(
+const zorba::String localName)
 {
   FuncMap_t::iterator lIte = theFunctions.find(localName);
 
@@ -102,7 +102,7 @@
 
 
 /***
-
+  Invoked from static_context::~static_context()
 /
 void ZorbaQueryModule::destroy() 
 {
@@ -231,7 +231,9 @@
 /***
 
 /
-void ZorbaQueryFunction::throwError(const char *err_localname, const std::string aErrorMessage)
+void ZorbaQueryFunction::throwError(
+const char *err_localname,
+const std::string aErrorMessage)
 {
   String errNS(ZORBA_QUERY_MODULE_NAMESPACE);
   String errName(err_localname);
@@ -356,18 +358,12 @@
   
   //construct the arguments for the url resolver
   std::vectorItemSequence_t lArgs;
-  ItemSequence_t lSeq0 = new SingletonItemSequence(theFunction);
   ItemSequence_t lSeq1 = new SingletonItemSequence(ZorbaQueryModule::getItemFactory()-createString(aUri));
   ItemSequence_t lSeq2 = new SingletonItemSequence(ZorbaQueryModule::getItemFactory()-createString(lDataKind));
-  lArgs.push_back(lSeq0);
   lArgs.push_back(lSeq1);
   lArgs.push_back(lSeq2);
 
-  //invoke the HOF helper function using the arguments generated
-  Item lHofHelper = ZorbaQueryModule::getItemFactory()-
-  createQName(http://zorba.io/modules/zorba-query;, zq, hof-invoker);
-
-  ItemSequence_t lResult = theCtx-invoke(lHofHelper, lArgs);
+  ItemSequence_t lResult = theCtx-invoke(theFunction, lArgs);
   
   //Check if the result is an empty sequence by creating an Iterator, this is
   // cheaper than serializing the result and then checking if it was empty.
@@ -406,18 +402,12 @@
 
   //construct the arguments for the url resolver
   std::vectorItemSequence_t lArgs;
-  ItemSequence_t lSeq0 = new SingletonItemSequence(theFunction);
   ItemSequence_t lSeq1 = new SingletonItemSequence(ZorbaQueryModule::getItemFactory()-createString(aUrl));
   ItemSequence_t lSeq2 = new SingletonItemSequence(ZorbaQueryModule::getItemFactory()-createString(lDataKind));
-  lArgs.push_back(lSeq0);
   lArgs.push_back(lSeq1);
   lArgs.push_back(lSeq2);
   
-  //invoke the HOF helper function using the arguments generated
-  Item lHofHelper = ZorbaQueryModule::getItemFactory()-
-  createQName(http://zorba.io/modules/zorba-query;, zq, hof-invoker);
-
-  ItemSequence_t lResult = theCtx-invoke(lHofHelper, lArgs);
+  ItemSequence_t lResult = theCtx-invoke(theFunction, lArgs);
 
   // Check if the result is an empty sequence by creating an Iterator, this is
   // cheaper than serializing the result and then checking if it was empty.
@@ -460,8 +450,10 @@
   DynamicContext* lDynCtx = const_castDynamicContext*(aDctx);
   StaticContext_t lSctxChild = aSctx-createChildContext();

-  QueryMap* lQueryMap;
-  if (!(lQueryMap = dynamic_castQueryMap*(lDynCtx-getExternalFunctionParameter(zqQueryMap
+  QueryMap* lQueryMap =
+  dynamic_castQueryMap*(lDynCtx-getExternalFunctionParameter(zqQueryMap));
+
+  if (!lQueryMap)
   {

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-archiver into lp:zorba

2013-09-26 Thread Markos Zaharioudakis
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-archiver/+merge/187699
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
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


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-archiver into lp:zorba

2013-09-26 Thread Markos Zaharioudakis
The proposal to merge lp:~zorba-coders/zorba/bug-archiver into lp:zorba has 
been updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-archiver/+merge/187699
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-archiver/+merge/187699
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
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