summaryrefslogtreecommitdiff
path: root/src/include/api.h
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2013-04-11 15:58:42 -0400
committerKeith Bostic <keith@wiredtiger.com>2013-04-11 15:58:42 -0400
commit5488e656fa88b46ac187cef6533a6e4cb3cc62cc (patch)
tree9377cb34d9852a5d1872f81b3f3814bdac5e70c0 /src/include/api.h
parentdb2ce0c4e6dbef194573c40d600e1ed3e7cc8835 (diff)
downloadmongo-5488e656fa88b46ac187cef6533a6e4cb3cc62cc.tar.gz
More work on data-source configuration support.
We can't stack a random set of entries into a cfg[] because we don't want to allocate memory in the API. Instead, whenever a method's arguments are reconfigured, re-build the base configuration string by appending the new configuration, and re-build the checks array, that way we always have a single base configuration string and a single checks array. Re-work how we're handling lists, we can't expect the application to crack them, they can be seriously messy. If it's a list, create an array of NULL-terminated refrences to nul-terminated strings (create an "argv" array, in other words). It's ugly, and the user has to free the memory, but I don't see an alternative.
Diffstat (limited to 'src/include/api.h')
-rw-r--r--src/include/api.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/api.h b/src/include/api.h
index 90fbd48ca8f..1405fd67499 100644
--- a/src/include/api.h
+++ b/src/include/api.h
@@ -19,12 +19,12 @@
#define API_CALL(s, h, n, cur, dh, config, cfg) do { \
const char *cfg[] = \
- { WT_CONFIG_NAME(s, h##_##n), config, NULL }; \
+ { WT_CONFIG_BASE(s, h##_##n), config, NULL }; \
API_SESSION_INIT(s, h, n, cur, dh); \
WT_ERR(F_ISSET(S2C(s), WT_CONN_PANIC) ? __wt_panic(s) : 0); \
WT_ERR(((config) != NULL) ? \
__wt_config_check((s), \
- WT_CONFIG_CALL(session, h##_##n), (config), 0) : 0)
+ WT_CONFIG_REF(session, h##_##n), (config), 0) : 0)
#define API_END(s) \
if ((s) != NULL) { \