search for: 27c5ede2

Displaying 4 results from an estimated 4 matches for "27c5ede2".

2020 Aug 10
2
[PATCH nbdkit] python: Allow extents to return any iterable (which includes lists).
...fset, flags): - # return a list of (offset, length, type) tuples: + # return an iterable object (eg. list) of + # (offset, length, type) tuples: return [ (off1, len1, type1), (off2, len2, type2), ... ] =back diff --git a/plugins/python/python.c b/plugins/python/python.c index 46b912e2..27c5ede2 100644 --- a/plugins/python/python.c +++ b/plugins/python/python.c @@ -1035,7 +1035,8 @@ py_extents (void *handle, uint32_t count, uint64_t offset, struct handle *h = handle; PyObject *fn; PyObject *r; - Py_ssize_t i, size; + PyObject *iter, *t; + size_t size; if (callback_defined...
2020 Sep 01
0
[nbdkit PATCH 1/2] python: Implement .list_exports and friends
...hon-export-list.py \ python-thread-model.py \ shebang.py \ test-python-exception.sh \ test-python-export-name.sh \ + test-python-export-list.sh \ test-python-plugin.py \ test-python-thread-model.sh \ test-python.sh \ diff --git a/plugins/python/python.c b/plugins/python/python.c index 27c5ede2..498ffebc 100644 --- a/plugins/python/python.c +++ b/plugins/python/python.c @@ -536,6 +536,99 @@ py_get_ready (void) return 0; } +static int +py_list_exports (int readonly, int is_tls, struct nbdkit_exports *exports) +{ + ACQUIRE_PYTHON_GIL_FOR_CURRENT_SCOPE; + PyObject *fn; + PyObject *r;...
2020 Sep 01
4
[nbdkit PATCH 0/2] More language bindings for .list_exports
This picks up python and ocaml. Some of our languages are lacking a number of bindings (for example, lua and perl lack .extents, so I didn't have anything to copy from), and I felt less comfortable with golang and rust. But for python and ocaml, I was able to test a working implementation. Eric Blake (2): python: Implement .list_exports and friends ocaml: Implement .list_exports and
2020 Sep 21
18
[nbdkit PATCH v3 00/14] exportname filter
It's been several weeks since I posted v2 (I got distracted by improving libnbd to better test things, which in turn surfaced some major memory leak problems in nbdsh that are now fixed). Many of the patches are minor rebases from v2, with the biggest changes being fallout from: - patch 2: rename nbdkit_add_default_export to nbdkit_use_default_export - overall: this missed 1.22, so update