Displaying 20 results from an estimated 12000 matches similar to: "[PATCH 1/2] Convert all TABs-as-indentation to spaces."
2017 Apr 25
0
[PATCH] daemon: Use CLEANUP_* functions to avoid an explicit free in stub functions.
---
generator/daemon.ml | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/generator/daemon.ml b/generator/daemon.ml
index b00627063..9d5ba00b2 100644
--- a/generator/daemon.ml
+++ b/generator/daemon.ml
@@ -155,13 +155,13 @@ let generate_daemon_stubs actions () =
| RBool _ -> pr " int r;\n"
| RConstString _ | RConstOptString _
2009 Aug 28
1
[PATCHES] avoid more warnings
>From 23740528cd2d75a236aae1fb5d073e8be2e5a295 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering at redhat.com>
Date: Fri, 28 Aug 2009 13:43:16 +0200
Subject: [PATCH libguestfs 1/3] generator.ml: avoid warnings in generated ocaml/guestfs_c_actions.c
* src/generator.ml: Emit prototypes for ocaml_guestfs_* functions,
to avoid warnings from gcc -Wmissing-prototypes. Normally we'd
2020 Jun 01
1
[PATCH] erlang: Port to libei for Erlang 23
From: Sergei Golovan <sgolovan@gmail.com>
Replace the use of liberl_interface, which is removed in Erlang 23,
by libei. The implementation uses the ei_decode_iodata() function
which has been introduces only for Erlang 23, so it doesnt work with
earlier Erlang versions.
---
erlang/Makefile.am | 1 -
erlang/main.c | 312 +++++++++++++++++++++++++-------------------
2016 Dec 08
4
[PATCH] generator: Share Common_utils code.
For a very long time we have maintained two sets of utility functions,
in mllib/common_utils.ml and generator/utils.ml. This changes things
so that the same set of utility functions can be shared with both
directories.
It's not possible to use common_utils.ml directly in the generator
because it provides several functions that use modules outside the
OCaml stdlib. Therefore we add some
2017 Mar 18
0
[PATCH] python: check return value of Python APIs
Addressing issue #1406906.
When constructing the returned objects, check the return value of
Python APIs.
This is especially relevant when dealing with non UTF-8 strings.
A RuntimeError will be raised on failure pointing to the problematic
entry and the field name.
Signed-off-by: Matteo Cafasso <noxdafox@gmail.com>
---
generator/python.ml | 143
2017 Apr 25
1
[Bug #1406906] [PATCH] python: fix segmentation fault when setting non UTF-8 strings
When constructing the returned objects, check the return value of
Python APIs.
A RuntimeError will be raised on failure pointing to the problematic
entry and the field name.
Signed-off-by: Matteo Cafasso <noxdafox@gmail.com>
---
generator/python.ml | 143 +++++++++++++++++++++++++++++++++++-----------------
1 file changed, 97 insertions(+), 46 deletions(-)
diff --git
2017 Jul 21
0
[PATCH v2 01/23] daemon: Allow parts of the daemon and APIs to be written in OCaml.
This change allows parts of the daemon to be written in the OCaml
programming language. I am using the ‘Main Program in C’ method along
with ‘-output-obj’ to create an object file from the OCaml code /
runtime, as described here:
https://caml.inria.fr/pub/docs/manual-ocaml/intfc.html
Furthermore, change the generator to allow individual APIs to be
implemented in OCaml. This is picked by
2009 Sep 24
1
[PATCH libguestfs] maint: use spaces, not TABs for indentation
>From 1da1502b33d50bc0614a20bc217876fcb8f05d39 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering at vv.meyering.net.meyering.net>
Date: Thu, 24 Sep 2009 09:24:55 +0200
Subject: [PATCH libguestfs] maint: use spaces, not TABs for indentation
"make syntax-check" was failing. This fixes it.
* HACKING: Indent with spaces, not TABs.
* configure.ac: Likewise.
*
2017 May 11
1
[PATCH v2] RHBZ#1406906: check return value of Python object functions
Verify the returned values of Python Object constructor functions
are not NULL before adding them to a collection.
This is particularly relevant when constructing Unicode strings in
Python 3 as they will return NULL if non UTF-8 characters are present.
Signed-off-by: Matteo Cafasso <noxdafox@gmail.com>
---
generator/python.ml | 102 ++++++++++++++++++++++++++---------------
2016 Feb 24
3
[PATCH 1/3] src: generate code for printing contents of structs
Extend the generator to generate a source (and the header for it) with
functions that print the content of a guestfs struct. The code is
modelled after the code for it in fish.ml, although made a bit more
generic (destination FILE*, line separator) so it can be used also in
the library, when tracing.
This just introduces the new code and builds it as part of the helper
libutils.la.
---
2017 May 09
0
[PATCH] python: add simple wrappers for PyObject<->string functions
The current need for #ifdef's based on the presence of
PyString_FromString makes both the OCaml code of the generator, and the
generated C code a mess to read.
Hence, add three simple wrappers to make both the OCaml, and C code more
readable, and easier to tweak in the future.
---
generator/python.ml | 72 ++++++++++++-----------------------------------------
python/handle.c | 52
2013 Feb 04
1
[PATCH] generator: Add visibility to action struct
The visibility field in action replaces in_fish, in_docs and internal.
The defined types are:
VPublic:
A public API. This is exported and documented in all language
bindings, and in guestfish.
VStateTest:
A public API which queries the library state machine. It is exported
and documented in all language bindings, but not guestfish.
VBindTest:
An internal API used only for testing
2017 Oct 04
0
[PATCH 2/9] ocaml: Replace pattern matching { field = field } with { field }.
If you have a struct containing ?field?, eg:
type t = { field : int }
then previously to pattern-match on this type, eg. in function
parameters, you had to write:
let f { field = field } =
(* ... use field ... *)
In OCaml >= 3.12 it is possible to abbreviate cases where the field
being matched and the variable being bound have the same name, so now
you can just write:
let f {
2017 May 09
1
[PATCH] RHBZ#1406906: check return value of Python object functions
Verify the returned values of Python Object constructor functions
are not NULL before adding them to a collection.
This is particularly relevant when constructing Unicode strings in
Python 3 as they will return NULL if non UTF-8 characters are present.
Signed-off-by: Matteo Cafasso <noxdafox@gmail.com>
---
generator/python.ml | 102 ++++++++++++++++++++++++++---------------
2015 Oct 20
3
[PATCH 1/2] generator: add a RelativePathnameList parameter type
Mostly like StringList (so it can used in current StringList
parameters), but checking client- and daemon-side that the elements are
relative paths.
---
generator/bindtests.ml | 3 ++-
generator/c.ml | 29 ++++++++++++++++++++++++-----
generator/csharp.ml | 4 ++--
generator/daemon.ml | 20 ++++++++++++++++++--
generator/erlang.ml | 2 +-
generator/fish.ml |
2015 Oct 21
2
[PATCH 1/2] generator: add a FilenameList parameter type
Mostly like StringList (so it can used in current StringList
parameters), but checking client- and daemon-side that the elements are
file names.
---
generator/bindtests.ml | 3 ++-
generator/c.ml | 29 ++++++++++++++++++++++++-----
generator/csharp.ml | 4 ++--
generator/daemon.ml | 20 ++++++++++++++++++--
generator/erlang.ml | 2 +-
generator/fish.ml | 10
2017 May 04
1
[PATCH] perl: drop %guestfs_introspection stuff
It is not something standard, and actually unused by libguestfs itself.
Possibly going to be used by the old virt-v2v (which was in Perl), but
never used for that either.
---
generator/perl.ml | 112 +--------------------------------------------
perl/t/900-introspection.t | 43 -----------------
2 files changed, 1 insertion(+), 154 deletions(-)
delete mode 100644
2009 Aug 17
1
[PATCH libguestfs] generator.ml: do not emit unused print_* functions
One final set:
cmds.c:968:13: warning: 'print_lvm_pv' defined but not used
cmds.c:1012:13: warning: 'print_lvm_vg' defined but not used
cmds.c:1055:13: warning: 'print_lvm_lv' defined but not used
cmds.c:1142:13: warning: 'print_dirent' defined but not used
cmds.c:1196:13: warning: 'print_xattr' defined but not used
cmds.c:1220:13:
2009 Aug 17
2
[PATCH libguestfs] generator.ml: do not emit unused print_*_list functions
I see the following warnings:
cmds.c:934:13: warning: 'print_int_bool_list' defined but not used
cmds.c:1093:13: warning: 'print_stat_list' defined but not used
cmds.c:1124:13: warning: 'print_statvfs_list' defined but not used
cmds.c:1171:13: warning: 'print_version_list' defined but not used
This patch makes it so we don't emit the unused
2016 Feb 24
0
[PATCH 3/3] src: print contents of structs and struct lists on tracing
It eases the debugging, instead of getting just the name of the struct
returned.
---
generator/c.ml | 29 ++++++++++++++++++++---------
1 file changed, 20 insertions(+), 9 deletions(-)
diff --git a/generator/c.ml b/generator/c.ml
index 9af4529..7446412 100644
--- a/generator/c.ml
+++ b/generator/c.ml
@@ -1348,6 +1348,7 @@ and generate_client_actions hash () =
#include