Changeset: 2da88edaecd3 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2da88edaecd3
Modified Files:
sql/common/sql_types.c
testing/exportutils.py
Branch: client-filetrans
Log Message:
Merge with default branch.
diffs (86 lines):
diff --git a/sql/common/sql_types.c b/sql/common/sql_types.c
--- a/sql/common/sql_types.c
+++ b/sql/common/sql_types.c
@@ -779,8 +779,6 @@ sql_find_func(sql_allocator *sa, sql_sch
for (; he && !found; he = he->chain)
if (he->value == prev->func)
found = 1;
- if (found)
- he = he->chain;
}
for (; he; he = he->chain) {
sql_func *f = he->value;
@@ -809,8 +807,6 @@ sql_find_func(sql_allocator *sa, sql_sch
for (; he && !found; he = he->chain)
if (he->value == prev->func)
found = 1;
- if (found)
- he = he->chain;
}
for (; he; he = he->chain) {
sql_func *f = he->value;
@@ -830,8 +826,6 @@ sql_find_func(sql_allocator *sa, sql_sch
for (; n && !found; n = n->next)
if (n->data == prev)
found = 1;
- if (found)
- n = n->next;
}
for (; n; n = n->next) {
sql_func *f = n->data;
@@ -914,8 +908,6 @@ sql_bind_member(sql_allocator *sa, sql_s
for(; n && !found; n = n->next)
if (n->data == prev->func)
found = 1;
- if (n)
- n = n->next;
}
for (; n; n = n->next) {
sql_func *f = n->data;
@@ -937,8 +929,6 @@ sql_bind_member(sql_allocator *sa, sql_s
for(; n && !found; n = n->next)
if (n->data == prev->func)
found = 1;
- if (n)
- n = n->next;
}
for (; n; n = n->next) {
sql_func *f = n->data;
diff --git a/testing/exportutils.py b/testing/exportutils.py
--- a/testing/exportutils.py
+++ b/testing/exportutils.py
@@ -61,18 +61,18 @@ def preprocess(data):
def replace(line, defines, tried):
changed = False
+ # match argument to macro with optionally several levels
+ # of parentheses
+ if deepnesting: # optionally deeply nested parentheses
+ nested =
r'(?:\([^()]*(?:\([^()]*(?:\([^()]*(?:\([^()]*(?:\([^()]*(?:\([^()]*\)[^()]*)*\)[^()]*)*\)[^()]*)*\)[^()]*)*\)[^()]*)*\)[^()]*)*'
+ else:
+ nested = ''
for name, (args, body) in defines.items():
if name in tried:
continue
pat = r'\b%s\b' % name
sep = r'\('
for arg in args:
- # match argument to macro with optionally several levels
- # of parentheses
- if deepnesting: # optionally deeply nested parentheses
- nested =
r'(?:\([^()]*(?:\([^()]*(?:\([^()]*(?:\([^()]*(?:\([^()]*(?:\([^()]*\)[^()]*)*\)[^()]*)*\)[^()]*)*\)[^()]*)*\)[^()]*)*\)[^()]*)*'
- else:
- nested = ''
pat = pat + sep + r'([^,()]*(?:\([^()]*' + nested + r'\)[^,()]*)*)'
sep = ','
pat += r'\)'
@@ -104,8 +104,8 @@ def replace(line, defines, tried):
pos = res2.start(0) + len(repl[arg])
bd = bd[:res2.start(0)] + repl[arg] + bd[res2.end(0):]
res2 = r2.search(bd, pos)
+ bd = bd.replace('##', '')
bd, changed = replace(bd, defines, tried + [name])
- bd = bd.replace('##', '')
line = line[:res.start(0)] + bd + line[res.end(0):]
res = r.search(line, res.start(0) + len(bd))
return line, changed
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list