search for: name_of_optargt

Displaying 20 results from an estimated 51 matches for "name_of_optargt".

2012 Jan 09
1
[PATCH 1/2] generator: Rename java_structs to camel_structs to better reflect their purpose
This map was originally included just for the java bindings, but is generally useful to any binding which uses camel case by requirement or convention. --- generator/generator_haskell.ml | 4 ++-- generator/generator_java.ml | 10 +++++----- generator/generator_main.ml | 2 +- generator/generator_structs.ml | 12 +++++------- generator/generator_structs.mli | 8 ++++---- 5
2020 Jul 06
2
[PATCH] python: Add type hints
...ring = "self" ^ - map_join (fun arg ->sprintf ", %s" (name_of_argt arg)) + map_join (fun arg ->sprintf ", %s%s" (name_of_argt arg) (type_hint_of_argt arg)) args ^ - map_join (fun optarg -> sprintf ", %s=None" (name_of_optargt optarg)) - optargs in + map_join (fun optarg -> sprintf ", %s: Optional[%s] = None" (name_of_optargt optarg) (type_hint_of_optargt optarg)) + optargs ^ + ") -> " ^ ret_type_hint ^ ":" in pr "\n"; - pr "...
2019 Jun 27
0
[PATCH 5/9] Rust bindings: Add generator of structs for optional arguments
...optargs <> [] then ( + pr "\n"; + pr "/* Optional Structs */\n"; + pr "#[derive(Default)]\n"; + pr "pub struct OptArgs%s {\n" cname; + List.iter ( + fun optarg -> + let n = translate_bad_symbols (name_of_optargt optarg) in + match optarg with + | OBool _ -> + pr " _%s: Option<bool>,\n" n + | OInt _ -> + pr " _%s: Option<i32>,\n" n + | OInt64 _ -> + pr " _%s: Option<i6...
2020 Jul 06
0
Re: [PATCH] python: Add type hints
...t;self" ^ > - map_join (fun arg ->sprintf ", %s" (name_of_argt arg)) > + map_join (fun arg ->sprintf ", %s%s" (name_of_argt arg) (type_hint_of_argt arg)) > args ^ > - map_join (fun optarg -> sprintf ", %s=None" (name_of_optargt optarg)) > - optargs in > + map_join (fun optarg -> sprintf ", %s: Optional[%s] = None" (name_of_optargt optarg) (type_hint_of_optargt optarg)) > + optargs ^ > + ") -> " ^ ret_type_hint ^ ":" in > pr "\n&...
2016 Dec 08
4
[PATCH] generator: Share Common_utils code.
...gth suffix + 2 in - pr ",\n%s%s" indent (spaces namelen) + pr ",\n%s%s" indent (String.spaces namelen) ) ); comma := true @@ -230,7 +231,8 @@ and generate_actions_pod_entry ({ c_name = c_name; List.iter ( fun argt -> let n = name_of_optargt argt in - pr " GUESTFS_%s_%s, " (String.uppercase c_name) (String.uppercase n); + pr " GUESTFS_%s_%s, " (String.uppercase_ascii c_name) + (String.uppercase_ascii n); match argt with | OBool n -> pr "int %s,\n" n | O...
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.
2012 Jan 17
2
[PATCH 1/2] c: NFC Remove redundant parentheses
...or_c.ml | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/generator/generator_c.ml b/generator/generator_c.ml index 4324ec0..9cfb2b7 100644 --- a/generator/generator_c.ml +++ b/generator/generator_c.ml @@ -1187,7 +1187,7 @@ trace_send_line (guestfs_h *g) let n = name_of_optargt argt in let uc_shortname = String.uppercase shortname in let uc_n = String.uppercase n in - pr " if ((optargs->bitmask & GUESTFS_%s_%s_BITMASK))\n" + pr " if (optargs->bitmask & GUESTFS_%s_%s_BITMASK)\n"...
2019 Jun 27
0
Re: [PATCH 08/11] Rust bindings: Fix memory management and format the file
...ptional Structs */\n"; pr "#[derive(Default)]\n"; - pr "pub struct OptArgs%s {\n" cname; + pr "pub struct %sOptArgs%s {\n" cname opt_life_parameter; List.iter ( fun optarg -> let n = translate_bad_symbols (name_of_optargt optarg) in match optarg with | OBool _ -> - pr " _%s: Option<bool>,\n" n + pr " pub %s: Option<bool>,\n" n | OInt _ -> - pr " _%s: Option<i32>,\n" n +...
2020 Jul 07
1
Re: [PATCH] python: Add type hints
...> - map_join (fun arg ->sprintf ", %s" (name_of_argt arg)) > > + map_join (fun arg ->sprintf ", %s%s" (name_of_argt arg) (type_hint_of_argt arg)) > > args ^ > > - map_join (fun optarg -> sprintf ", %s=None" (name_of_optargt optarg)) > > - optargs in > > + map_join (fun optarg -> sprintf ", %s: Optional[%s] = None" (name_of_optargt optarg) (type_hint_of_optargt optarg)) > > + optargs ^ > > + ") -> " ^ ret_type_hint ^ ":" in >...
2012 Jan 17
3
GObject bindings
This is the first iteration of the GObject bindings. I have 'kicked the tyres' on these, meaning I have ensured that a bunch of basic manual tests work as expected. I'm in the process of adding more comprehensive tests. Here's an example simple javascript program which uses these bindings: === const Guestfs = imports.gi.Guestfs; print('Starting'); var g = new
2019 Jun 27
4
Re: [PATCH 9/9] Rust bindings: Complete bindings
Patch 9 is a kind of dumping ground of all kinds of stuff. It may be better to spend some time with git rebase -i trying to work this into more coherent patches. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live
2012 Apr 26
3
[PATCH 1/3] gobject: NFC generated code formatting fix
...() = pr "G_DEFINE_TYPE(%s, guestfs_%s, G_TYPE_OBJECT);\n\n" camel_name name; pr "enum {\n"; - pr "PROP_GUESTFS_%s_PROP0" uc_name; + pr " PROP_GUESTFS_%s_PROP0" uc_name; List.iter ( fun optargt -> let uc_optname = String.uppercase (name_of_optargt optargt) in -- 1.7.10
2019 Jun 27
0
[PATCH 7/9] Rust bindings: Complete actions
...pr "}\n\n"; + + (* raw struct for C bindings *) + pr "#[repr(C)]\n"; + pr "struct RawOptArgs%s {\n" cname; + pr " bitmask: u64,\n"; + List.iter ( + fun optarg -> + let n = translate_bad_symbols (name_of_optargt optarg) in + match optarg with + | OBool _ -> + pr " %s: c_int,\n" n + | OInt _ -> + pr " %s: c_int,\n" n + | OInt64 _ -> + pr " %s: i64,\n" n + | OString _...
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.
2019 Jun 27
16
[PATCH 1/9] Rust bindings: Add Rust bindings
From: Hiroyuki_Katsura <hiroyuki.katsura.0513@gmail.com> --- Makefile.am | 4 ++++ configure.ac | 3 +++ generator/Makefile.am | 3 +++ generator/bindtests.ml | 3 +++ generator/bindtests.mli | 1 + generator/main.ml | 5 +++++ generator/rust.ml | 34 ++++++++++++++++++++++++++++++++++ generator/rust.mli | 19 +++++++++++++++++++
2019 Jun 27
0
[PATCH 9/9] Rust bindings: Complete bindings
...quot;; pr "#[derive(Default)]\n"; - pr "pub struct OptArgs%s%s {\n" cname opt_life_parameter; + pr "pub struct %sOptArgs%s {\n" cname opt_life_parameter; List.iter ( fun optarg -> let n = translate_bad_symbols (name_of_optargt optarg) in match optarg with | OBool _ -> - pr " _%s: Option<bool>,\n" n + pr " pub %s: Option<bool>,\n" n | OInt _ -> - pr " _%s: Option<i32>,\n" n +...
2019 Jul 02
16
[PATCH] Add Rust bindings
I fixed the patch I submitted before based on comments, and there are some commits which are merged or divided. So, I will re-send all the patches. Regards, Hiroyuki Katsura
2019 Jul 20
0
[PATCH] Rust bindings: Add Rust bindings
...hen ( + pr "\n"; + pr "/* Optional Structs */\n"; + pr "#[derive(Default)]\n"; + pr "pub struct %sOptArgs%s {\n" cname opt_life_parameter; + List.iter ( + fun optarg -> + let n = translate_bad_symbols (name_of_optargt optarg) in + match optarg with + | OBool _ -> + pr " pub %s: Option<bool>,\n" n + | OInt _ -> + pr " pub %s: Option<i32>,\n" n + | OInt64 _ -> + pr " pub %s: Opt...
2019 Jul 23
2
Re: [PATCH] Rust bindings: Add Rust bindings
...t;; > + pr "/* Optional Structs */\n"; > + pr "#[derive(Default)]\n"; > + pr "pub struct %sOptArgs%s {\n" cname opt_life_parameter; > + List.iter ( > + fun optarg -> > + let n = translate_bad_symbols (name_of_optargt optarg) in > + match optarg with > + | OBool _ -> > + pr " pub %s: Option<bool>,\n" n > + | OInt _ -> > + pr " pub %s: Option<i32>,\n" n > + | OInt64 _ -> > +...
2019 Jul 23
0
Re: [PATCH] Rust bindings: Add Rust bindings
...hen ( + pr "\n"; + pr "/* Optional Structs */\n"; + pr "#[derive(Default)]\n"; + pr "pub struct %sOptArgs%s {\n" cname opt_life_parameter; + List.iter ( + fun optarg -> + let n = translate_bad_symbols (name_of_optargt optarg) in + match optarg with + | OBool _ -> + pr " pub %s: Option<bool>,\n" n + | OInt _ -> + pr " pub %s: Option<i32>,\n" n + | OInt64 _ -> + pr " pub %s: Opt...