summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorAlex Gorrod <alexg@wiredtiger.com>2015-03-20 17:16:01 +1100
committerAlex Gorrod <alexg@wiredtiger.com>2015-03-20 17:16:01 +1100
commit978146c882b98fb57920c288e0ec959cb82e8ab0 (patch)
tree34e9176c2e0cc9a8883913c9b7b52227c0dc5c6e /dist
parentd0f4b3de9945a0572e3d34b3e12e5249577558df (diff)
parent2816a322a79155ca020430bf8ed3a06555d429f0 (diff)
downloadmongo-978146c882b98fb57920c288e0ec959cb82e8ab0.tar.gz
Merge branch 'develop' into index-cursor-compare
Conflicts: src/config/config_def.c
Diffstat (limited to 'dist')
-rw-r--r--dist/api_config.py15
-rw-r--r--dist/api_data.py6
-rw-r--r--dist/s_string.ok1
3 files changed, 14 insertions, 8 deletions
diff --git a/dist/api_config.py b/dist/api_config.py
index 83a57ad4e0d..5608933defb 100644
--- a/dist/api_config.py
+++ b/dist/api_config.py
@@ -165,9 +165,12 @@ w = textwrap.TextWrapper(width=64, break_on_hyphens=False)
w.wordsep_re = w.wordsep_simple_re = re.compile(r'(,)')
def checkstr(c):
- '''Generate the JSON string used by __wt_config_check to validate the
- config string'''
+ '''Generate the function reference and JSON string used by __wt_config_check
+ to validate the config string'''
checks = c.flags
+ cfunc = str(checks.get('func', ''))
+ if not cfunc:
+ cfunc = 'NULL';
cmin = str(checks.get('min', ''))
cmax = str(checks.get('max', ''))
choices = checks.get('choices', [])
@@ -180,9 +183,9 @@ def checkstr(c):
result.append('choices=' + '[' +
','.join('\\"' + s + '\\"' for s in choices) + ']')
if result:
- return '"' + ','.join(result) + '"'
+ return cfunc + ', "' + ','.join(result) + '"'
else:
- return 'NULL'
+ return cfunc + ', NULL'
def get_default(c):
t = gettype(c)
@@ -206,7 +209,7 @@ def add_subconfig(c):
tfile.write('''
static const WT_CONFIG_CHECK confchk_%(name)s_subconfigs[] = {
\t%(check)s
-\t{ NULL, NULL, NULL, NULL }
+\t{ NULL, NULL, NULL, NULL, NULL }
};
''' % {
'name' : c.name,
@@ -230,7 +233,7 @@ for name in sorted(api_data.methods.keys()):
tfile.write('''
static const WT_CONFIG_CHECK confchk_%(name)s[] = {
\t%(check)s
-\t{ NULL, NULL, NULL, NULL }
+\t{ NULL, NULL, NULL, NULL, NULL }
};
''' % {
'name' : name.replace('.', '_'),
diff --git a/dist/api_data.py b/dist/api_data.py
index 2a4083183e2..a4f0b0754d5 100644
--- a/dist/api_data.py
+++ b/dist/api_data.py
@@ -163,11 +163,13 @@ file_config = format_meta + [
Config('huffman_key', 'none', r'''
configure Huffman encoding for keys. Permitted values are
\c "none", \c "english", \c "utf8<file>" or \c "utf16<file>".
- See @ref huffman for more information'''),
+ See @ref huffman for more information''',
+ func='__wt_huffman_confchk'),
Config('huffman_value', 'none', r'''
configure Huffman encoding for values. Permitted values are
\c "none", \c "english", \c "utf8<file>" or \c "utf16<file>".
- See @ref huffman for more information'''),
+ See @ref huffman for more information''',
+ func='__wt_huffman_confchk'),
Config('internal_key_truncate', 'true', r'''
configure internal key truncation, discarding unnecessary
trailing bytes on internal keys (ignored for custom
diff --git a/dist/s_string.ok b/dist/s_string.ok
index 4cde9f99091..961c09bec26 100644
--- a/dist/s_string.ok
+++ b/dist/s_string.ok
@@ -496,6 +496,7 @@ compat
concat
cond
conf
+confchk
config
conn
connectionp