search for: connhandl

Displaying 3 results from an estimated 3 matches for "connhandl".

Did you mean: connhandle
2018 Apr 11
0
[nbdkit PATCH v2 5/5] RFC: python: Track and cache per-connection state in C struct
...1 insertions(+), 32 deletions(-) diff --git a/plugins/python/python.c b/plugins/python/python.c index ad79c80..757a0e9 100644 --- a/plugins/python/python.c +++ b/plugins/python/python.c @@ -389,51 +389,66 @@ py_config_complete (void) return 0; } +/* All per-connection state */ +typedef struct ConnHandle { + PyObject *obj; + int fua; +} ConnHandle; + static void * py_open (int readonly) { PyObject *fn; - PyObject *handle; + ConnHandle *h = malloc (sizeof *h); + if (!h) { + nbdkit_error ("%s: %m", script); + return NULL; + } if (!callback_defined ("open", &...
2018 Apr 19
1
Re: [nbdkit PATCH v2 5/5] RFC: python: Track and cache per-connection state in C struct
...a/plugins/python/python.c b/plugins/python/python.c > index ad79c80..757a0e9 100644 > --- a/plugins/python/python.c > +++ b/plugins/python/python.c > @@ -389,51 +389,66 @@ py_config_complete (void) > return 0; > } > > +/* All per-connection state */ > +typedef struct ConnHandle { > + PyObject *obj; > + int fua; > +} ConnHandle; > + > static void * > py_open (int readonly) > { > PyObject *fn; > - PyObject *handle; > + ConnHandle *h = malloc (sizeof *h); > > + if (!h) { > + nbdkit_error ("%s: %m", script); &gt...
2018 Apr 11
10
[nbdkit PATCH v2 0/5] FUA support in Python scripts
First out of our four language bindings to add FUA support (for reference, I added 'zero' support for python, perl, and ruby back in 1.1.13, then Rich had to add it for ocaml in 1.1.20). I tested this heavily under python 2, but for now only compile tested under python 3; I plan to do further testing there and make any tweaks if necessary. I wrote patch 5 early on, but then realized I