summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEtienne Petrel <etienne.petrel@mongodb.com>2023-02-07 03:53:13 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-02-07 04:46:39 +0000
commit4a8ea50ac4dae76d9220f1d0e013356230ffdfa2 (patch)
treee60c5a0c3aa0fc96f5de66a60cd5688fc5dda88f
parentb281cb0b47188ae91da4184aa74aac5e7b2afbcd (diff)
downloadmongo-4a8ea50ac4dae76d9220f1d0e013356230ffdfa2.tar.gz
Import wiredtiger: e32dbb148b3eeaa82bb5378027428c037eb668c6 from branch mongodb-master
ref: feb6de965c..e32dbb148b for: 6.3.0-rc0 Revert "WT-10184 Update SWIG mapping for int64_t*"
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/lang/python/wiredtiger.i12
-rw-r--r--src/third_party/wiredtiger/test/suite/test_count01.py6
3 files changed, 10 insertions, 10 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index c427ef4a4e1..2ed0baeae56 100644
--- a/src/third_party/wiredtiger/import.data
+++ b/src/third_party/wiredtiger/import.data
@@ -2,5 +2,5 @@
"vendor": "wiredtiger",
"github": "wiredtiger/wiredtiger.git",
"branch": "mongodb-master",
- "commit": "feb6de965c15e2ca722ff70094c2f37f46265ebf"
+ "commit": "e32dbb148b3eeaa82bb5378027428c037eb668c6"
}
diff --git a/src/third_party/wiredtiger/lang/python/wiredtiger.i b/src/third_party/wiredtiger/lang/python/wiredtiger.i
index 18145f6a157..bae0d66298f 100644
--- a/src/third_party/wiredtiger/lang/python/wiredtiger.i
+++ b/src/third_party/wiredtiger/lang/python/wiredtiger.i
@@ -90,9 +90,6 @@ from packing import pack, unpack
%typemap(in, numinputs=0) wt_off_t * (wt_off_t temp = false) {
$1 = &temp;
}
-%typemap(in, numinputs=0) int64_t * (int64_t temp = 0) {
- $1 = &temp;
-}
%typemap(in, numinputs=0) WT_EVENT_HANDLER * %{
$1 = &pyApiEventHandler;
@@ -325,6 +322,11 @@ from packing import pack, unpack
%typemap(out) uint64_t {
$result = PyLong_FromUnsignedLongLong($1);
}
+%typemap(out) int64_t {
+ $result = PyLong_FromLongLong($1);
+}
+
+%pointer_class(int64_t, int64_t_ptr);
/* Internal _set_key, _set_value methods take a 'bytes' object as parameter. */
%pybuffer_binary(unsigned char *data, int);
@@ -687,10 +689,6 @@ OVERRIDE_METHOD(__wt_cursor, WT_CURSOR, search_near, (self))
}
}
-%typemap(argout) int64_t * {
- $result = PyLong_FromLongLong(*$1);
-}
-
/* Handle binary data input from FILE_HANDLE->fh_write. */
%typemap(in,numinputs=1) (size_t length, const void *buf) (Py_ssize_t length, const void *buf = NULL) {
if (PyBytes_AsStringAndSize($input, &buf, &length) < 0)
diff --git a/src/third_party/wiredtiger/test/suite/test_count01.py b/src/third_party/wiredtiger/test/suite/test_count01.py
index 9efc05e687a..3ddd127d162 100644
--- a/src/third_party/wiredtiger/test/suite/test_count01.py
+++ b/src/third_party/wiredtiger/test/suite/test_count01.py
@@ -38,9 +38,11 @@ class test_count01(wttest.WiredTigerTestCase):
def test_count_api(self):
self.session.create(self.uri, 'key_format=i,value_format=i')
-
+
+ count = wiredtiger.int64_t_ptr()
self.assertRaisesException(
- wiredtiger.WiredTigerError, lambda: self.session.count(self.uri))
+ wiredtiger.WiredTigerError, lambda: self.session.count(self.uri, count))
+ self.assertEqual(count.value(), -1)
if __name__ == '__main__':