[Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-951016 into lp:zorba
The proposal to merge lp:~paul-lucas/zorba/bug-951016 into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102557 -- https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102557 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:~paul-lucas/zorba/bug-951016 into lp:zorba
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/bug-951016-2012-04-19T14-05-59.25Z/log.html -- https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102557 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
Re: [Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-951016 into lp:zorba
The attempt to merge lp:~paul-lucas/zorba/bug-951016 into lp:zorba failed. Below is the output from the failed tests. CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 (message): Validation queue job bug-951016-2012-04-19T14-05-59.25Z is finished. The final status was: No tests were run - build or configure step must have failed. Not commiting changes. Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake -- https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102557 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:~paul-lucas/zorba/bug-951016 into lp:zorba
The proposal to merge lp:~paul-lucas/zorba/bug-951016 into lp:zorba has been updated. Status: Approved = Needs review For more details, see: https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102557 -- https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102557 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:~paul-lucas/zorba/bug-951016 into lp:zorba
The proposal to merge lp:~paul-lucas/zorba/bug-951016 into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102557 -- https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102557 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:~paul-lucas/zorba/bug-951016 into lp:zorba
Paul J. Lucas has proposed merging lp:~paul-lucas/zorba/bug-951016 into lp:zorba. Requested reviews: Paul J. Lucas (paul-lucas) Matthias Brantner (matthias-brantner) Related bugs: Bug #951016 in Zorba: integer comparison warning in integer.h https://bugs.launchpad.net/zorba/+bug/951016 For more details, see: https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102707 Added functions to get rid of warnings. Added is_xs_TT() functions to Integer. -- https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102707 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'src/util/stl_util.h' --- src/util/stl_util.h 2012-04-16 20:56:43 + +++ src/util/stl_util.h 2012-04-19 14:22:23 + @@ -21,6 +21,7 @@ #include cassert #include cstring #include iterator +#include limits #include set #include stack @@ -292,6 +293,80 @@ /// +// +// These functions are used to test whether a value of numeric type N1 is +// within the range of another numeric type N2. It correctly handles the +// cases where the signed-ness of N1 and N2 differ such that the code is +// warning-free. +// + +templatetypename N1,typename N2 inline +typename std::enable_ifZORBA_TR1_NS::is_signedN1::value + ZORBA_TR1_NS::is_signedN2::value,bool::type +ge_min( N1 n1, N2 ) { + return n1 = std::numeric_limitsN2::min(); +} + +templatetypename N1,typename N2 inline +typename std::enable_ifZORBA_TR1_NS::is_signedN1::value + ZORBA_TR1_NS::is_unsignedN2::value,bool::type +ge_min( N1 n1, N2 ) { + return n1 = 0; +} + +templatetypename N1,typename N2 inline +typename std::enable_ifZORBA_TR1_NS::is_unsignedN1::value + ZORBA_TR1_NS::is_signedN2::value,bool::type +ge_min( N1, N2 ) { + return true; +} + +templatetypename N1,typename N2 inline +typename std::enable_ifZORBA_TR1_NS::is_unsignedN1::value + ZORBA_TR1_NS::is_unsignedN2::value,bool::type +ge_min( N1, N2 ) { + return true; +} + +templatetypename N1,typename N2 inline +typename std::enable_ifZORBA_TR1_NS::is_signedN1::value + ZORBA_TR1_NS::is_signedN2::value,bool::type +le_max( N1 n1, N2 ) { + return n1 = std::numeric_limitsN2::max(); +} + +templatetypename N1,typename N2 inline +typename std::enable_ifZORBA_TR1_NS::is_signedN1::value + ZORBA_TR1_NS::is_unsignedN2::value,bool::type +le_max( N1 n1, N2 ) { + return n1 = 0 || static_castN2( n1 ) = std::numeric_limitsN2::max(); +} + +templatetypename N1,typename N2 inline +typename std::enable_ifZORBA_TR1_NS::is_unsignedN1::value + ZORBA_TR1_NS::is_signedN2::value,bool::type +le_max( N1 n1, N2 ) { + return n1 = static_castN1( std::numeric_limitsN2::max() ); +} + +templatetypename N1,typename N2 inline +typename std::enable_ifZORBA_TR1_NS::is_unsignedN1::value + ZORBA_TR1_NS::is_unsignedN2::value,bool::type +le_max( N1 n1, N2 ) { + return n1 = std::numeric_limitsN2::max(); +} + +#define ZORBA_GE_MIN(N,T) \ + ::zorba::ztd::ge_min( N, static_castT(0) ) + +#define ZORBA_LE_MAX(N,T) \ + ::zorba::ztd::le_max( N, static_castT(0) ) + +#define ZORBA_IN_RANGE(N,T) \ + ( ZORBA_GE_MIN(N,T) ZORBA_LE_MAX(N,T) ) + +/// + templatetypename T class stack_generator { std::stackT stk; public: === modified file 'src/zorbatypes/decimal.h' --- src/zorbatypes/decimal.h 2012-04-17 16:07:10 + +++ src/zorbatypes/decimal.h 2012-04-19 14:22:23 + @@ -200,7 +200,9 @@ // miscellaneous - bool is_integer() const; + bool is_xs_int() const; + bool is_xs_integer() const; + bool is_xs_long() const; uint32_t hash() const; @@ -227,8 +229,6 @@ static uint32_t hash( value_type const ); - bool is_xs_long() const; - enum parse_options { parse_integer, parse_decimal @@ -387,13 +387,18 @@ return hash( value_ ); } -inline bool Decimal::is_integer() const { +inline bool Decimal::is_xs_int() const { + return value_.is_integer() + value_ = MAPM::getMinInt32() value_ = MAPM::getMaxInt32(); +} + +inline bool Decimal::is_xs_integer() const { return value_.is_integer() != 0; } inline bool Decimal::is_xs_long() const { return value_.is_integer() - value_ MAPM::getMinInt64() value_ MAPM::getMaxInt64(); + value_ = MAPM::getMinInt64() value_ = MAPM::getMaxInt64(); } inline int Decimal::sign() const { === modified file 'src/zorbatypes/integer.cpp' --- src/zorbatypes/integer.cpp 2012-04-17 16:07:10 + +++ src/zorbatypes/integer.cpp 2012-04-19 14:22:23 + @@ -259,7 +259,7 @@ TEMPLATE_DECL(T) bool operator==( INTEGER_IMPL(T) const i, Decimal const d ) { - return d.is_integer() i.itod() == d.value_; + return d.is_xs_integer() i.itod() == d.value_; }
[Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-951016 into lp:zorba
The proposal to merge lp:~paul-lucas/zorba/bug-951016 into lp:zorba has been updated. Commit Message changed to: Added functions to get rid of warnings. Added is_xs_TT() functions to Integer. For more details, see: https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102707 -- https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102707 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
Re: [Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-951016 into lp:zorba
Review: Approve -- https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102707 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:~paul-lucas/zorba/bug-951016 into lp:zorba
The proposal to merge lp:~paul-lucas/zorba/bug-951016 into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102707 -- https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102707 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:~paul-lucas/zorba/bug-951016 into lp:zorba
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/bug-951016-2012-04-19T14-44-58.911Z/log.html -- https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102707 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
Re: [Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-951016 into lp:zorba
Voting does not meet specified criteria. Required: Approve 1, Disapprove 1, Needs Fixing 1, Pending 1. Got: 1 Approve, 1 Pending. -- https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102707 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:~paul-lucas/zorba/bug-951016 into lp:zorba
The proposal to merge lp:~paul-lucas/zorba/bug-951016 into lp:zorba has been updated. Status: Approved = Needs review For more details, see: https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102707 -- https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102707 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
Re: [Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-951016 into lp:zorba
Review: Approve -- https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102707 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:~paul-lucas/zorba/bug-951016 into lp:zorba
The proposal to merge lp:~paul-lucas/zorba/bug-951016 into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102707 -- https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102707 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:~paul-lucas/zorba/bug-951016 into lp:zorba
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/bug-951016-2012-04-19T16-15-57.634Z/log.html -- https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102707 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:~paul-lucas/zorba/bug-951016 into lp:zorba
Validation queue job bug-951016-2012-04-19T16-15-57.634Z is finished. The final status was: All tests succeeded! -- https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102707 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:~paul-lucas/zorba/bug-951016 into lp:zorba
The proposal to merge lp:~paul-lucas/zorba/bug-951016 into lp:zorba has been updated. Status: Approved = Merged For more details, see: https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102707 -- https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102707 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
Re: [Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-951016 into lp:zorba
Review: Approve -- https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102540 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
Re: [Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-951016 into lp:zorba
FYI: I need this as a prerequisite for the full-text module. -- https://code.launchpad.net/~paul-lucas/zorba/bug-951016/+merge/102540 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