search for: 806408f

Displaying 3 results from an estimated 3 matches for "806408f".

2017 May 09
1
[PATCH v2] python: add simple wrappers for PyObject<->string functions
..., size);\n"; - pr "#endif\n"; + pr " py_r = guestfs_int_py_fromstringsize (r, size);\n"; pr " free (r);\n"; pr " if (py_r == NULL) goto out;\n"; ); diff --git a/python/handle.c b/python/handle.c index 806408f..f347c00 100644 --- a/python/handle.c +++ b/python/handle.c @@ -241,11 +241,7 @@ guestfs_int_py_event_to_string (PyObject *self, PyObject *args) return NULL; } -#ifdef HAVE_PYSTRING_ASSTRING - py_r = PyString_FromString (str); -#else - py_r = PyUnicode_FromString (str); -#endif + py_r...
2017 May 09
0
[PATCH] python: add simple wrappers for PyObject<->string functions
..., size);\n"; - pr "#endif\n"; + pr " py_r = guestfs_int_py_fromstringsize (r, size);\n"; pr " free (r);\n"; pr " if (py_r == NULL) goto out;\n"; ); diff --git a/python/handle.c b/python/handle.c index 806408f..1840f91 100644 --- a/python/handle.c +++ b/python/handle.c @@ -241,11 +241,7 @@ guestfs_int_py_event_to_string (PyObject *self, PyObject *args) return NULL; } -#ifdef HAVE_PYSTRING_ASSTRING - py_r = PyString_FromString (str); -#else - py_r = PyUnicode_FromString (str); -#endif + py_r...
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: