search for: generate_prototype

Displaying 20 results from an estimated 53 matches for "generate_prototype".

2014 Jun 27
3
[PATCH WIP] Can't generate argv variant
Hi everyone, lately I've been getting familiar with library and working on slight re-layering of the library. It's about having locking layer in public API and tracing one layer below that (let's call it __t_ layer. I'm not very good at making up names, so this is temporary:) ). Then making sure that all generated public stuff call __t_ layer and all other internal stuff
2012 Oct 22
3
[PATCH 0/2 NOT WORKING] Symbol versioning
John, This was my attempt to add symbol versioning to the library, letting us break ABI without breaking any existing callers. Unfortunately it doesn't work: - the new versioned symbols are marked local in libguestfs.so - the existing symbols should now have @GUESTFS_0.0 versions, but don't The documentation for this stuff is extremely thin, and I've got a bad case of
2012 Jan 18
4
[PATCH 1/4] ocaml: Add -Wno-missing-field-initializers to avoid a warning.
From: "Richard W.M. Jones" <rjones at redhat.com> --- configure.ac | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index fa97479..6e42423 100644 --- a/configure.ac +++ b/configure.ac @@ -141,6 +141,10 @@ if test "$gl_gcc_warnings" = yes; then # Work around warning in src/inspect.c. This seems to be a bug in gcc
2012 Jul 14
6
[PATCH 0/6] Allow non-optargs functions to gain optional arguments.
This rather complex set of patches allow non-optargs functions to gain optional arguments, while preserving source and binary backwards compatibility. The problem is that we cannot add an optional argument to an existing function. For example, we might want to add flags to the 'lvresize' API which currently has no optional arguments.
2012 Oct 30
5
[PATCH v3 0/5] Add symbol versioning.
This is a simpler patch series to add symbol versioning. I have pushed patches 1-3 upstream. Rich.
2012 Oct 30
7
[PATCH v2 0/7] Add symbol versioning (now working).
This rather more complex patch series adds symbol versioning (7/7 shows it in action). This works for me, tested by running old and new virt-inspector binaries against the new library. Rich.
2017 Oct 04
0
[PATCH 2/9] ocaml: Replace pattern matching { field = field } with { field }.
...) ) ptests; List.iter ( - fun { name = name; style = (ret, args, _ as style) } -> + fun { name; style = (ret, args, _ as style) } -> if String.sub name (String.length name - 3) 3 <> "err" then ( pr "/* Test normal return. */\n"; generate_prototype ~extern:false ~semicolon:false ~newline:true diff --git a/generator/c.ml b/generator/c.ml index 6396b4159..02d33ffc3 100644 --- a/generator/c.ml +++ b/generator/c.ml @@ -206,7 +206,7 @@ and generate_actions_pod () = generate_actions_pod_entry f ) (actions |> documented_functions |>...
2014 May 15
2
[PATCH] Add global mutex around each C call
From: Maros Zatko <mzatko@redhat.com> Patch adds recursive mutex around C calls, which tries to fix potential race condition in guestfs_umount_local (see [1]). [1] - https://bugzilla.redhat.com/show_bug.cgi?id=917706 Maros Zatko (1): generator: c.ml - wrap non deamon function with recursive mutex generator/c.ml | 12 ++++++++++++ 1 file changed, 12 insertions(+) -- 1.8.5.3
2015 May 28
4
[PATCH 1/4] generator: move api_version to a common version_added
...ompat_entry { name = name; added = added; - style = ret, args, _ } = +and generate_actions_pod_back_compat_entry ({ name = name; + style = ret, args, _ } as f) = pr "=head2 guestfs_%s\n\n" name; generate_prototype ~extern:false ~indent:" " ~handle:"g" ~prefix:"guestfs_" name (ret, args, []); @@ -334,13 +336,10 @@ and generate_actions_pod_back_compat_entry { name = name; added = added; pr "L</guestfs_%s_opts> with no optional arguments.\n" name; pr &quo...
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.
2016 Sep 02
6
[PATCH 0/4] generator: Some work to split large C files
By splitting up large C files we can make parallel compiles a bit faster. Rich.
2016 Nov 08
0
[PATCH 2/3] Split internal stuff out of guestfs.h
....filter is_public (actions |> sort) @@ -47,6 +53,9 @@ let public_functions_sorted = let private_functions_sorted = List.filter is_private (actions |> sort) +let internal_functions_sorted = + List.filter is_internal (actions |> sort) + (* Generate a C function prototype. *) let rec generate_prototype ?(extern = true) ?(static = false) ?(semicolon = true) @@ -607,13 +616,6 @@ extern GUESTFS_DLL_PUBLIC void *guestfs_next_private (guestfs_h *g, const char * generate_all_headers private_functions_sorted; - pr "\ -/* Private structures. */ - -"; - - generate_all_structs inter...
2009 Sep 09
2
[PATCH] Add command trace functionality
...ot;\\n\");\n"; + pr " }\n"; + pr "\n"; + in + (* For non-daemon functions, generate a wrapper around each function. *) List.iter ( fun (shortname, style, _, _, _, _, _) -> @@ -4638,6 +4710,7 @@ check_state (guestfs_h *g, const char *caller) generate_prototype ~extern:false ~semicolon:false ~newline:true ~handle:"g" name style; pr "{\n"; + trace_call shortname style; pr " return guestfs__%s " shortname; generate_c_call_args ~handle:"g" style; pr ";\n"; @@ -4745,6...
2016 Nov 08
4
[PATCH 1/3] generator: c: move internal functions
Move the generate_all_structs and generate_all_headers functions, previously internal within the implementation of generate_guestfs_h, to be usable by other functions in the same "C" module (but not public). Only code motion. --- generator/c.ml | 163 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 82 insertions(+), 81 deletions(-) diff --git a/generator/c.ml
2014 May 29
2
[PATCH] library: per-handle locking support
...erator/c.ml @@ -788,6 +788,9 @@ and generate_internal_actions_h () = pr "#define GUESTFS_INTERNAL_ACTIONS_H_\n"; pr "\n"; + pr "#include \"locking.h\"\n"; + pr "\n"; + List.iter ( fun { c_name = c_name; style = style } -> generate_prototype ~single_line:true ~newline:true ~handle:"g" @@ -1569,6 +1572,9 @@ and generate_client_actions hash () = handle_null_optargs optargs c_name; + pr " guestfs___per_handle_lock_lock (g);\n"; + pr "\n"; + pr " int trace_flag = g->trace;\n"...
2012 Feb 23
1
[PATCH v2] Add a flag to make some functions called only at CONFIG state(RHBZ796520)
..._send_line (guestfs_h *g) (* For non-daemon functions, generate a wrapper around each function. *) List.iter ( - fun (shortname, (ret, _, optargs as style), _, _, _, _, _) -> + fun (shortname, (ret, _, optargs as style), _, flags, _, _, _) -> if optargs = [] then generate_prototype ~extern:false ~semicolon:false ~newline:true ~handle:"g" ~prefix:"guestfs_" @@ -1046,6 +1046,12 @@ trace_send_line (guestfs_h *g) pr " struct guestfs_%s_list *r;\n" typ ); pr "\n"; + if List.mem ConfigOnly flags then...
2013 Jan 24
3
[REVIEW ONLY] Mountable patches
These 3 patches implement support for APIs which must accept a mountable, but don't update apis which must return mountables. Matt
2019 Apr 23
8
[PATCH 0/7] Make deprecation warnings more prominent
Since there are deprecated APIs, make sure that users notice they are deprecated in more prominent ways than done so far: - using deprecated C functions now warns by default - it is possible to use the C library making sure no deprecated function is ever used - Python/Ruby/Perl scripts now get warning messages (configured according to their own systems) when deprecated functions are used The
2013 Feb 07
12
[PATCH 01/12] generator: Add new Mountable argument type
...hname n - | Device n | Dev_or_Path n + | Device n | Mountable n | Dev_or_Path n | String n | FileIn n | FileOut n diff --git a/generator/c.ml b/generator/c.ml index 518ac1b..afa81ed 100644 --- a/generator/c.ml +++ b/generator/c.ml @@ -121,7 +121,7 @@ let rec generate_prototype ?(extern = true) ?(static = false) List.iter ( function | Pathname n - | Device n | Dev_or_Path n + | Device n | Mountable n | Dev_or_Path n | String n | OptString n | Key n -> @@ -852,6 +852,7 @@ and generate_client_actions hash () = (* p...
2014 Dec 10
2
[PATCH v1 0/2] Implement guestfs_add_libvirt_dom.
This is only lightly tested at the moment. For context see: https://bugzilla.redhat.com/show_bug.cgi?id=1138203#c40 https://bugzilla.redhat.com/show_bug.cgi?id=1075143 https://bugzilla.redhat.com/show_bug.cgi?id=1075164 Note this is not a complete fix. At least one more libguestfs patch is required (to implement virDomainPtr in the python bindings). Plus a virt-manager patch. Rich.