summaryrefslogtreecommitdiff
path: root/src/include/api.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/api.h')
-rw-r--r--src/include/api.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/include/api.h b/src/include/api.h
index d6e923e3560..3acb39acb19 100644
--- a/src/include/api.h
+++ b/src/include/api.h
@@ -11,7 +11,8 @@
const char *__oldname = (s)->name; \
(s)->cursor = (cur); \
(s)->dhandle = (dh); \
- (s)->name = #h "." #n;
+ (s)->name = #h "." #n; \
+ ++(s)->api_level
#define API_CALL_NOCONF(s, h, n, cur, dh) do { \
API_SESSION_INIT(s, h, n, cur, dh); \
@@ -31,7 +32,8 @@
#define API_END(s, ret) \
if ((s) != NULL) { \
(s)->dhandle = __olddh; \
- (s)->name = __oldname; \
+ if (--(s)->api_level > 0) \
+ (s)->name = __oldname; \
if (F_ISSET(&(s)->txn, TXN_RUNNING) && \
(ret) != 0 && \
(ret) != WT_NOTFOUND && \