diff options
author | Keith Bostic <keith@wiredtiger.com> | 2013-04-10 13:58:34 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2013-04-10 13:58:34 -0400 |
commit | 00b0fe3a1da717fccae3b72dffd96b478868b797 (patch) | |
tree | 549c7c995f5fa7061e5561fe754516db9b8e0ab6 /src/config/config.c | |
parent | 38927b655cfb25f4ad8eb2f696d8ef9aaca9c2ae (diff) | |
download | mongo-00b0fe3a1da717fccae3b72dffd96b478868b797.tar.gz |
Add a new method WT_EXTENSION_API::config that takes a cfg[] and returns
a configuration string's value. Push that method through the KVS code
in test/format.
Diffstat (limited to 'src/config/config.c')
-rw-r--r-- | src/config/config.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/config/config.c b/src/config/config.c index 50264aa6313..261e70ca88e 100644 --- a/src/config/config.c +++ b/src/config/config.c @@ -652,6 +652,28 @@ __wt_config_gets(WT_SESSION_IMPL *session, } /* + * __wt_ext_config -- + * Given a NULL-terminated list of configuration strings, find the final + * value for a given string key (external API version). + */ +int +__wt_ext_config(WT_SESSION *wt_session, + const char *key, void *cfg, WT_EXTENSION_CONFIG *value) +{ + WT_CONFIG_ITEM v; + WT_SESSION_IMPL *session; + + session = (WT_SESSION_IMPL *)wt_session; + + WT_RET(__wt_config_gets(session, cfg, key, &v)); + + value->str = v.str; + value->len = v.len; + value->value = v.val; + return (0); +} + +/* * __wt_config_getone -- * Get the value for a given key from a single config string. */ |