Merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba

Proposed by Markos Zaharioudakis
Status: Merged
Approved by: Markos Zaharioudakis
Approved revision: 10992
Merge reported by: Markos Zaharioudakis
Merged at revision: not available
Proposed branch: lp:~zorba-coders/zorba/markos-scratch
Merge into: lp:zorba
Diff against target: 51 lines (+14/-14)
2 files modified
src/api/dynamiccontextimpl.cpp (+12/-12)
src/store/naive/pul_primitives.cpp (+2/-2)
To merge this branch: bzr merge lp:~zorba-coders/zorba/markos-scratch
Reviewer Review Type Date Requested Status
Markos Zaharioudakis Approve
Review via email: mp+136641@code.launchpad.net

Commit message

removed call to create_value_type() in DynamicContextImpl::setVariable()

Description of the change

removed call to create_value_type() in DynamicContextImpl::setVariable()

To post a comment you must log in.
Revision history for this message
Markos Zaharioudakis (markos-za) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 (message):
  Validation queue job markos-scratch-2012-11-28T12-46-53.942Z is finished.
  The final status was:

  2 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job markos-scratch-2012-11-28T19-06-44.704Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/api/dynamiccontextimpl.cpp'
2--- src/api/dynamiccontextimpl.cpp 2012-10-22 17:08:12 +0000
3+++ src/api/dynamiccontextimpl.cpp 2012-11-28 12:39:22 +0000
4@@ -294,19 +294,19 @@
5
6 // For string items, check that the value is a valid Unicode codepoint sequence
7 const char* invalid_char;
8- TypeManager* tm = theStaticContext->get_typemanager();
9- RootTypeManager& rtm = GENV_TYPESYSTEM;
10-
11- xqtref_t itemType = tm->create_value_type(value);
12-
13- if (value->isStreamable() == false &&
14- TypeOps::is_equal(tm, *itemType, *rtm.STRING_TYPE_ONE, QueryLoc::null) &&
15- (invalid_char = utf8::validate(value->getStringValue().c_str())) != NULL)
16+
17+ if (value->isStreamable() == false && value->isAtomic())
18 {
19- throw XQUERY_EXCEPTION(err::FOCH0001,
20- ERROR_PARAMS(zstring("#x") +
21- BUILD_STRING(std::uppercase << std::hex
22- << (static_cast<unsigned int>(*invalid_char) & 0xFF)) ));
23+ store::SchemaTypeCode itemTypeCode = value->getTypeCode();
24+
25+ if (TypeOps::is_subtype(itemTypeCode, store::XS_STRING) &&
26+ (invalid_char = utf8::validate(value->getStringValue().c_str())) != NULL)
27+ {
28+ throw XQUERY_EXCEPTION(err::FOCH0001,
29+ ERROR_PARAMS(zstring("#x") +
30+ BUILD_STRING(std::uppercase << std::hex
31+ << (static_cast<unsigned int>(*invalid_char) & 0xFF)) ));
32+ }
33 }
34
35 VarInfo* var = NULL;
36
37=== modified file 'src/store/naive/pul_primitives.cpp'
38--- src/store/naive/pul_primitives.cpp 2012-11-21 03:17:34 +0000
39+++ src/store/naive/pul_primitives.cpp 2012-11-28 12:39:22 +0000
40@@ -302,9 +302,9 @@
41 UpdatePrimitive(pul, aLoc, target),
42 theNumApplied(0)
43 {
44- std::size_t numAttrs = attrs.size();
45+ csize numAttrs = attrs.size();
46 theNewAttrs.resize(numAttrs);
47- for (std::size_t i = 0; i < numAttrs; i++)
48+ for (csize i = 0; i < numAttrs; i++)
49 {
50 theNewAttrs[i].transfer(attrs[i]);
51 }

Subscribers

People subscribed via source and target branches