Displaying 6 results from an estimated 6 matches for "guestfs_int_py_close".
2017 May 21
3
[PATCH 0/2] python: improved UTF8 decoding error handling
The Python 3 bindings currently are unable to deal with non UTF8 characters.
This series continues what proposed in RHBZ#1406906.
A new function 'set_decode_error_handler' allows the User to specify
how to deal with decoding errors.
The default behaviour will be raising a UnicodeDecodeError.
If the handler is changed to 'surrogateescape', non UTF8 characters will be escaped
in a
2017 May 21
0
[PATCH 2/2] python: unicode decode handler error scheme setter
...n.ml
@@ -82,6 +82,7 @@ put_handle (guestfs_h *g)
}
extern void guestfs_int_py_extend_module (PyObject *module);
+extern PyObject *guestfs_int_py_set_decode_error_handler (PyObject *self, PyObject *args);
extern PyObject *guestfs_int_py_create (PyObject *self, PyObject *args);
extern PyObject *guestfs_int_py_close (PyObject *self, PyObject *args);
@@ -577,6 +578,8 @@ and generate_python_module () =
(* Table of functions. *)
pr "static PyMethodDef methods[] = {\n";
+ pr " { (char *) \"set_decode_error_handler\", \n";
+ pr " guestfs_int_py_set_decode_error_handle...
2017 Mar 03
5
[PATCH v2 0/4] Avoid 0-bytes malloc in bindings
Hi,
some of the bindings may try to malloc with 0 bytes as size when closing
an handle, because there were no event handlers registered. Since this
can have different behaviours in POSIX, avoid that situation altogether
by just skipping allocating anything when there were no event handlers.
Thanks,
Pino Toscano (4):
ocaml: do not try to malloc 0 elements in get_all_event_callbacks
python:
2016 May 05
1
[PATCH] python: use constants instead of raw values
...py.h
index da5f483..f2246a6 100644
--- a/python/guestfs-py.h
+++ b/python/guestfs-py.h
@@ -59,6 +59,8 @@ put_handle (guestfs_h *g)
#endif
}
+extern void guestfs_int_py_extend_module (PyObject *module);
+
extern PyObject *guestfs_int_py_create (PyObject *self, PyObject *args);
extern PyObject *guestfs_int_py_close (PyObject *self, PyObject *args);
extern PyObject *guestfs_int_py_set_event_callback (PyObject *self, PyObject *args);
--
2.5.5
2017 Mar 03
1
Re: [PATCH 08/11] ocaml: do not try to malloc 0 elements in get_all_event_callbacks
On Fri, Mar 03, 2017 at 03:33:02PM +0100, Pino Toscano wrote:
> In case there are no event handlers registered with the handle,
> get_all_event_callbacks will count 0 elements, trying to malloc a buffer
> of that size. POSIX says that this can result in either a null pointer,
> or an unusable pointer. Since we assume a null pointer means failure,
> then always add a null element
2016 Feb 05
7
[PATCH 0/7] lib: Stop exporting the safe_malloc, etc. functions.
The safe_malloc (etc) functions call g->abort_fn on failure. That's
not appropriate for language bindings, and we never intended that
these internal functions be used from language bindings, that was just
a historical accident.
This patch series removes any external use of the safe_* functions.
Rich.