search for: guestfs_int_py_event_to_str

Displaying 6 results from an estimated 6 matches for "guestfs_int_py_event_to_str".

2017 May 11
1
[PATCH] python: improve few exceptions thrown on error
...eption from an errno - throw TypeError if not getting a list when required --- python/handle.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/handle.c b/python/handle.c index 88024e1..9746dca 100644 --- a/python/handle.c +++ b/python/handle.c @@ -237,7 +237,7 @@ guestfs_int_py_event_to_string (PyObject *self, PyObject *args) str = guestfs_event_to_string (events); if (str == NULL) { - PyErr_SetString (PyExc_RuntimeError, strerror (errno)); + PyErr_SetFromErrno (PyExc_RuntimeError); return NULL; } @@ -271,7 +271,7 @@ get_all_event_callbacks (guestfs_h *g, size_...
2017 May 09
1
[PATCH v2] python: add simple wrappers for PyObject<->string functions
...python/handle.c | 65 ++++++++++++++++++++++++++--------------------- 2 files changed, 53 insertions(+), 84 deletions(-) diff --git a/generator/python.ml b/generator/python.ml index 0162733..cf08294 100644 --- a/generator/python.ml +++ b/generator/python.ml @@ -91,6 +91,9 @@ extern PyObject *guestfs_int_py_event_to_string (PyObject *self, PyObject *args) extern char **guestfs_int_py_get_string_list (PyObject *obj); extern PyObject *guestfs_int_py_put_string_list (char * const * const argv); extern PyObject *guestfs_int_py_put_table (char * const * const argv); +extern PyObject *guestfs_int_py_fromstring (const...
2017 May 09
0
[PATCH] python: add simple wrappers for PyObject<->string functions
...--------- python/handle.c | 52 +++++++++++++++++++++++++------------- 2 files changed, 51 insertions(+), 73 deletions(-) diff --git a/generator/python.ml b/generator/python.ml index 0162733..cf08294 100644 --- a/generator/python.ml +++ b/generator/python.ml @@ -91,6 +91,9 @@ extern PyObject *guestfs_int_py_event_to_string (PyObject *self, PyObject *args) extern char **guestfs_int_py_get_string_list (PyObject *obj); extern PyObject *guestfs_int_py_put_string_list (char * const * const argv); extern PyObject *guestfs_int_py_put_table (char * const * const argv); +extern PyObject *guestfs_int_py_fromstring (const...
2017 Oct 04
0
[PATCH 2/9] ocaml: Replace pattern matching { field = field } with { field }.
..._HAVE_%s\n" (String.uppercase_ascii c_name); pr "PyObject *\n"; pr "guestfs_int_py_%s (PyObject *self, PyObject *args)\n" name; @@ -585,7 +583,7 @@ and generate_python_module () = pr " { (char *) \"event_to_string\",\n"; pr " guestfs_int_py_event_to_string, METH_VARARGS, NULL },\n"; List.iter ( - fun { name = name; c_name = c_name } -> + fun { name; c_name } -> pr "#ifdef GUESTFS_HAVE_%s\n" (String.uppercase_ascii c_name); pr " { (char *) \"%s\", guestfs_int_py_%s, METH_VARARGS, NULL },\n...
2016 Dec 08
4
[PATCH] generator: Share Common_utils code.
...case_ascii n in pr "#ifdef %s_%s_BITMASK\n" c_optarg_prefix uc_n; pr " if (py_%s != Py_None && (optargs_s.bitmask & %s_%s_BITMASK) != 0)\n" n c_optarg_prefix uc_n; @@ -606,7 +607,7 @@ and generate_python_module () = pr " guestfs_int_py_event_to_string, METH_VARARGS, NULL },\n"; List.iter ( fun { name = name; c_name = c_name } -> - pr "#ifdef GUESTFS_HAVE_%s\n" (String.uppercase c_name); + pr "#ifdef GUESTFS_HAVE_%s\n" (String.uppercase_ascii c_name); pr " { (char *) \"%s\",...
2017 Oct 04
11
[PATCH 0/9] build: Require OCaml >= 4.02.
Per my previous email: https://www.redhat.com/archives/libguestfs/2017-September/msg00203.html I'd like to talk about requiring a more modern version of the OCaml compiler. These commits show some of the code changes which would be possible with OCaml >= 3.12 [which it turns out we already require by accident] and also with OCaml >= 4.02. The latter is my favoured option. Rich.