Merge lp:~danielturcanu/zorba/mytrunk into lp:zorba

Proposed by Daniel Turcanu
Status: Rejected
Rejected by: Matthias Brantner
Proposed branch: lp:~danielturcanu/zorba/mytrunk
Merge into: lp:zorba
Diff against target: 111 lines (+24/-10)
6 files modified
src/diagnostics/dict_XX_cpp.xq (+1/-0)
src/diagnostics/pregenerated/dict_en.cpp (+1/-0)
src/runtime/strings/strings_impl.cpp (+1/-1)
src/util/utf8_util_base.h (+0/-1)
src/zorbatypes/URI.cpp (+19/-8)
src/zorbatypes/URI.h (+2/-0)
To merge this branch: bzr merge lp:~danielturcanu/zorba/mytrunk
Reviewer Review Type Date Requested Status
Zorba Coders Pending
Review via email: mp+76577@code.launchpad.net

Commit message

Various fixes, moved out from no_unicode branch

Description of the change

Various fixes

To post a comment you must log in.
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 mytrunk-2011-09-22T13-09-07.026Z is finished. The final status was:

All tests succeeded!

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

Voting does not meet specified criteria. Required: Approve > 0, Disapprove < 1. Got: 1 Pending.

Revision history for this message
Matthias Brantner (matthias-brantner) wrote :

Daniel, which test does the URI change fix? I don't see a test for that and it's not mentioned in the ChangeLog. Same for analyze-string.

lp:~danielturcanu/zorba/mytrunk updated
10465. By Daniel Turcanu

some mess

10466. By Daniel Turcanu

.

10467. By Daniel Turcanu

Updated to trunk

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/diagnostics/dict_XX_cpp.xq'
2--- src/diagnostics/dict_XX_cpp.xq 2011-08-05 02:21:55 +0000
3+++ src/diagnostics/dict_XX_cpp.xq 2011-09-22 13:00:31 +0000
4@@ -64,6 +64,7 @@
5 return string-join(
6 ( util:copyright(),
7 '#include "stdafx.h"',
8+ '#include "zorba/config.h"',
9 '#include "diagnostics/dict_impl.h"',
10 '',
11 'namespace zorba {',
12
13=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
14--- src/diagnostics/pregenerated/dict_en.cpp 2011-09-16 21:58:20 +0000
15+++ src/diagnostics/pregenerated/dict_en.cpp 2011-09-22 13:00:31 +0000
16@@ -20,6 +20,7 @@
17 */
18
19 #include "stdafx.h"
20+#include "zorba/config.h"
21 #include "diagnostics/dict_impl.h"
22
23 namespace zorba {
24
25=== modified file 'src/runtime/strings/strings_impl.cpp'
26--- src/runtime/strings/strings_impl.cpp 2011-08-10 18:58:11 +0000
27+++ src/runtime/strings/strings_impl.cpp 2011-09-22 13:00:31 +0000
28@@ -1688,7 +1688,7 @@
29 GENV_ITEMFACTORY->createString(strid_item, zstrid);
30 store::Item_t id_attrib_item;
31 GENV_ITEMFACTORY->createAttributeNode(id_attrib_item, group_elem.getp(), nr_attrib_name, untyped_type_name, strid_item);
32- if(match_startg < 0)
33+ if((match_startg < 0) || (match_startg < match_endgood))
34 continue;
35 match_endgood = match_endg;
36 if((i+1)<nr_pattern_groups)
37
38=== modified file 'src/util/utf8_util_base.h'
39--- src/util/utf8_util_base.h 2011-07-17 20:05:49 +0000
40+++ src/util/utf8_util_base.h 2011-09-22 13:00:31 +0000
41@@ -148,7 +148,6 @@
42 * @return Returns the Unicode code-point of the next character.
43 */
44 template<class OctetIterator>
45-ZORBA_DLL_PUBLIC
46 unicode::code_point next_char( OctetIterator &i );
47
48 /**
49
50=== modified file 'src/zorbatypes/URI.cpp'
51--- src/zorbatypes/URI.cpp 2011-06-24 23:00:33 +0000
52+++ src/zorbatypes/URI.cpp 2011-09-22 13:00:31 +0000
53@@ -1191,7 +1191,16 @@
54 return is_set(Scheme) && !theScheme.empty();
55 }
56
57-
58+bool URI::is_absolute_path(zstring &thePath)
59+{
60+#ifndef WIN32
61+ return thePath[0] == '/';
62+#else
63+ return (thePath.length() > 2) &&
64+ ((thePath[1] == ':') ||
65+ ((thePath[1] == '%') && (thePath[2] == '3') && (thePath[3] == 'A')));
66+#endif
67+}
68
69 /*******************************************************************************
70
71@@ -1331,7 +1340,7 @@
72
73 // If the path component begins with a slash character ("/"), then
74 // the reference is an absolute-path and we skip to step 7.
75- if ( (is_set(Path)) && (thePath[0] =='/') )
76+ if ( is_set(Path) && is_absolute_path(thePath) )
77 {
78 invalidate_text();
79 return;
80@@ -1342,12 +1351,14 @@
81
82 if ( base_uri->is_set(Path) )
83 {
84- zstring::size_type last_slash = base_path.rfind("/");
85- if ( last_slash != zstring::npos )
86- path = base_path.substr(0, last_slash+1);
87-// else
88-// path = "/";
89-
90+ if(!is_absolute_path(thePath))
91+ {
92+ zstring::size_type last_slash = base_path.rfind("/");
93+ if ( last_slash != zstring::npos )
94+ path = base_path.substr(0, last_slash+1);
95+ // else
96+ // path = "/";
97+ }
98 }
99
100 // 6b - append the relative URI path
101
102=== modified file 'src/zorbatypes/URI.h'
103--- src/zorbatypes/URI.h 2011-06-14 17:26:33 +0000
104+++ src/zorbatypes/URI.h 2011-09-22 13:00:31 +0000
105@@ -190,6 +190,8 @@
106 void unset_state(uint32_t s) const { theState &= ~s; }
107
108 void invalidate_text() const;
109+
110+ bool is_absolute_path(zstring &thePath);
111 };
112
113

Subscribers

People subscribed via source and target branches