diff options
author | Keith Bostic <keith@wiredtiger.com> | 2012-05-11 10:56:09 +0000 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2012-05-11 10:56:09 +0000 |
commit | ff12749de3376be6c04a835b57cbb803fed9967e (patch) | |
tree | 5276ec18a2e1c844018c2937635ba183c2f25360 /lang | |
parent | 5a06143447e57a428aa85cd6fbb9c982831dcdb0 (diff) | |
download | mongo-ff12749de3376be6c04a835b57cbb803fed9967e.tar.gz |
The wiredtiger_struct_size() call can fail, it has to return an error
status, not a size.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/python/wiredtiger.i | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lang/python/wiredtiger.i b/lang/python/wiredtiger.i index cac7c7adb2e..9f3eef255d8 100644 --- a/lang/python/wiredtiger.i +++ b/lang/python/wiredtiger.i @@ -188,12 +188,15 @@ SELFHELPER(struct __wt_cursor) void _set_recno(uint64_t recno) { WT_ITEM k; + size_t size; uint8_t recno_buf[20]; if (wiredtiger_struct_pack($self->session, recno_buf, sizeof (recno_buf), "r", recno) == 0) { + /* XXX: what about an error return? */ + (void)wiredtiger_struct_size( + $self->session, &size, "q", recno); k.data = recno_buf; - k.size = (uint32_t) - wiredtiger_struct_size($self->session, "q", recno); + k.size = (uint32_t)size; $self->set_key($self, &k); } } |