search for: c04b7e2

Displaying 2 results from an estimated 2 matches for "c04b7e2".

Did you mean: c04657e2
2019 Nov 25
0
[PATCH nbdkit 1/2] python: For v2 API, avoid copy by passing a buffer to pread.
...python/python.c | 32 +++++++++++++++---------- tests/python-exception.py | 4 ++-- tests/shebang.py | 5 ++-- 5 files changed, 36 insertions(+), 29 deletions(-) diff --git a/plugins/python/example.py b/plugins/python/example.py index c85d2f8..c04b7e2 100644 --- a/plugins/python/example.py +++ b/plugins/python/example.py @@ -60,10 +60,12 @@ def get_size(h): return len(disk) -def pread(h, count, offset, flags): +def pread(h, buf, offset, flags): global disk - return disk[offset:offset+count] - + end = offset + len(buf) + bu...
2019 Nov 25
3
[PATCH nbdkit 0/2] python: Implement pread passing buffer for v2 API.
As suggested by Nir, here: https://www.redhat.com/archives/libguestfs/2019-November/thread.html#00220