search for: c_optarg_prefix

Displaying 20 results from an estimated 36 matches for "c_optarg_prefix".

2017 Oct 04
0
[PATCH 2/9] ocaml: Replace pattern matching { field = field } with { field }.
...fs_session_close (GuestfsSession *session, GError **err) let literal = Str.regexp "\\(^\\|\n\\)[ \t]+\\([^\n]*\\)\\(\n\\|$\\)" in List.iter ( - fun ({ name = name; style = (ret, args, optargs as style); - cancellable = cancellable; c_function = c_function; - c_optarg_prefix = c_optarg_prefix; - shortdesc = shortdesc; longdesc = longdesc; - deprecated_by = deprecated_by } as f) -> + fun ({ name; style = (ret, args, optargs as style); + cancellable; c_function; c_optarg_prefix; + shortdesc; longdesc; + deprecated_b...
2015 Sep 15
3
[PATCH 3/3] python: Allow bindings to be compiled with different version of libguestfs (RHBZ#1262983).
Patch to fix: https://bugzilla.redhat.com/show_bug.cgi?id=1262983 Note this won't help until the first two patches get backported to the stable branches, since <guestfs.h> won't define the necessary GUESTFS_HAVE_* macros. Rich.
2014 Aug 11
3
[PATCH] python: fix possible free on uninit memory with OStringList optargs
...OBool _ | OInt _ | OInt64 _ | OString _ -> () | OStringList n -> - pr " if (py_%s != Py_None)\n" n; + let uc_n = String.uppercase n in + pr " if (py_%s != Py_None && (optargs_s.bitmask |= %s_%s_BITMASK) != 0)\n" + n c_optarg_prefix uc_n; pr " free ((char **) optargs_s.%s);\n" n ) optargs; -- 1.9.3
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.
2017 Mar 03
1
[PATCH] erlang: Rename 'message' to something less generic.
...e = name } -> - pr "ETERM *run_%s (ETERM *message);\n" name + pr "ETERM *run_%s (ETERM *args_tuple);\n" name ) (actions |> external_functions |> sort); pr "\n"; @@ -355,7 +355,7 @@ instead of erl_interface. c_function = c_function; c_optarg_prefix = c_optarg_prefix } -> pr "\n"; pr "ETERM *\n"; - pr "run_%s (ETERM *message)\n" name; + pr "run_%s (ETERM *args_tuple)\n" name; pr "{\n"; iteri ( @@ -546,11 +546,11 @@ instead of erl_interface. #include \...
2019 Apr 23
0
[PATCH 7/7] perl: show warnings for deprecated functions
...changed, 11 insertions(+), 1 deletion(-) diff --git a/generator/perl.ml b/generator/perl.ml index efb31077c..af19650a8 100644 --- a/generator/perl.ml +++ b/generator/perl.ml @@ -335,7 +335,7 @@ PREINIT: List.iter ( fun { name; style = (ret, args, optargs as style); - c_function; c_optarg_prefix } -> + c_function; c_optarg_prefix; deprecated_by } -> (match ret with | RErr -> pr "void\n" | RInt _ -> pr "SV *\n" @@ -444,6 +444,16 @@ PREINIT: pr " PPCODE:\n"; ); + (match deprecated_by with +...
2015 Feb 10
4
[PATCH 1/4] php: fix invalid memory access with OptString
OptString maps to a "s!" argument, which makes zend_parse_parameters not touch the variables (char* and length) when NULL is passed as parameter. Hence, set both to NULL/0, and check for non-NULL char* variable before checking its length. --- generator/php.ml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/generator/php.ml b/generator/php.ml index
2012 Aug 14
7
[PATCH 0/7] Add tar compress, numericowner, excludes flags.
https://bugzilla.redhat.com/show_bug.cgi?id=847880 https://bugzilla.redhat.com/show_bug.cgi?id=847881 This patch series adds various optional arguments to the tar-in and tar-out commands. Firstly (1/7) an optional "compress" flag is added to select compression. This makes the calls tgz-in/tgz-out/txz-in/txz-out deprecated, and expands the range of compression types available.
2015 Feb 12
4
[PATCH 1/3] gobject: generate deprecation markers
...5b07edd..e563610 100644 --- a/generator/gobject.ml +++ b/generator/gobject.ml @@ -961,7 +961,8 @@ guestfs_session_close (GuestfsSession *session, GError **err) fun ({ name = name; style = (ret, args, optargs as style); cancellable = cancellable; c_function = c_function; c_optarg_prefix = c_optarg_prefix; - shortdesc = shortdesc; longdesc = longdesc } as f) -> + shortdesc = shortdesc; longdesc = longdesc; + deprecated_by = deprecated_by } as f) -> pr "\n"; let longdesc = Str.global_substitute urls ( @@ -1103,6 +1104,11...
2016 Dec 08
4
[PATCH] generator: Share Common_utils code.
...ls open Types open Utils open Pr @@ -176,7 +177,7 @@ fill_lvm_pv (guestfs_h *g, struct guestfs_lvm_pv *pv, size_t i) let check_optarg n printf_args = pr " fprintf (fp, \"%s: \");\n" n; pr " if (optargs->bitmask & %s_%s_BITMASK) {\n" c_optarg_prefix - (String.uppercase n); + (String.uppercase_ascii n); pr " fprintf (fp, %s);\n" printf_args; pr " } else {\n"; pr " fprintf (fp, \"unset\\n\");\n"; @@ -200,7 +201,7 @@ fill_lvm_pv (guestfs_h *g, struct guest...
2012 Sep 20
0
[PATCH] python: PyInt_* no longer exists in python3, replace with PyLong_*
...file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/python.ml b/generator/python.ml index 482b189..b4bc3ce 100644 --- a/generator/python.ml +++ b/generator/python.ml @@ -381,7 +381,7 @@ free_strings (char **argv) pr " optargs_s.bitmask |= %s_%s_BITMASK;\n" c_optarg_prefix uc_n; (match optarg with | OBool _ | OInt _ -> - pr " optargs_s.%s = PyInt_AsLong (py_%s);\n" n n; + pr " optargs_s.%s = PyLong_AsLong (py_%s);\n" n n; pr " if (PyErr_Occurred ()) return NULL;\n&...
2015 Feb 10
0
[PATCH 4/4] php: fix memory leak in OStringList optargs
..._ -> () ) args; + List.iter ( + function + | OBool n | OInt n | OInt64 n | OString n -> () + | OStringList n -> + let uc_n = String.uppercase n in + pr " if ((optargs_s.bitmask & %s_%s_BITMASK) != 0)\n" + c_optarg_prefix uc_n; + pr " guestfs_efree_stringlist ((char **) optargs_s.%s);\n" n; + pr "\n" + ) optargs; (* Check for errors. *) (match errcode_of_ret ret with -- 1.9.3
2013 Feb 04
1
[PATCH] generator: Add visibility to action struct
...rator/ruby.ml index 0114aca..706c726 100644 --- a/generator/ruby.ml +++ b/generator/ruby.ml @@ -393,13 +393,12 @@ ruby_user_cancel (VALUE gv) "; List.iter ( - fun ({ name = name; style = (ret, args, optargs as style); - in_docs = in_docs; - c_function = c_function; c_optarg_prefix = c_optarg_prefix; - shortdesc = shortdesc; longdesc = longdesc } as f) -> + fun f -> + let ret, args, optargs = f.style in + (* Generate rdoc. *) - if in_docs then ( - let doc = replace_str longdesc "C<guestfs_" "C<g." in +...
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.
2017 Jul 14
0
[PATCH 07/27] daemon: Reimplement ‘is_dir’, ‘is_file’ and ‘is_symlink’ APIs in OCaml.
...match f.impl with | OCaml f -> f @@ -625,8 +626,8 @@ return_string_list (value retv) let uc_n = String.uppercase_ascii n in (* optargs are all passed as [None|Some _] *) - pr " if ((optargs_bitmask & %s_%s_BITMASK) == 0)\n" - f.c_optarg_prefix uc_n; + pr " if ((optargs_bitmask & GUESTFS_%s_%s_BITMASK) == 0)\n" + uc_name uc_n; pr " args[%d] = Val_int (0); /* None */\n" !i; pr " else {\n"; pr " v = "; @@ -651,7 +652,7 @@ return_string_...
2020 Jun 01
1
[PATCH] erlang: Port to libei for Erlang 23
...tch over to using - #include <ei.h> -instead of erl_interface. -*/ +#include <ei.h> #include \"guestfs.h\" #include \"guestfs-utils.h\" @@ -358,33 +354,43 @@ instead of erl_interface. fun { name; style = (ret, args, optargs as style); c_function; c_optarg_prefix } -> pr "\n"; - pr "ETERM *\n"; - pr "run_%s (ETERM *args_tuple)\n" name; + pr "int\n"; + pr "run_%s (ei_x_buff *retbuff, const char *buff, int *idx)\n" name; pr "{\n"; List.iteri ( fu...
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
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
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.
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.