Displaying 20 results from an estimated 33 matches for "name_of_argt".
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
...OBool _ -> "bool"
+ | OInt _ | OInt64 _ -> "int"
+ | OString _ -> "str"
+ | OStringList _ -> "List[str]"
+ in
let decl_string =
"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: Op...
2016 Dec 08
4
[PATCH] generator: Share Common_utils code.
...- a/generator/erlang.ml
+++ b/generator/erlang.ml
@@ -20,6 +20,7 @@
open Printf
+open Common_utils
open Types
open Utils
open Pr
@@ -105,7 +106,7 @@ loop(Port) ->
pr "%s(G" name;
List.iter (
fun arg ->
- pr ", %s" (String.capitalize (name_of_argt arg))
+ pr ", %s" (String.capitalize_ascii (name_of_argt arg))
) args;
if optargs <> [] then
pr ", Optargs";
@@ -114,7 +115,7 @@ loop(Port) ->
pr " call_port(G, {%s" name;
List.iter (
fun arg ->
-...
2020 Jul 06
0
Re: [PATCH] python: Add type hints
...; + | OInt _ | OInt64 _ -> "int"
> + | OString _ -> "str"
> + | OStringList _ -> "List[str]"
> + in
> let decl_string =
> "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 -&g...
2014 Aug 04
6
[hivex] Segfault for an integer value to node_set_value
Hi,
When an integer argument is passed as value, node_set_value
segfaults. Reproducer is at the end of this message
The backtrace points at hivex-py.c, function get_value. While obj
is non-NULL, `bytes = PyUnicode_AsUTF8String (obj);` returns NULL.
Kind regards,
Peter
https://lekensteyn.nl
#!/usr/bin/env python3
import hivex, sys
h = hivex.Hivex(sys.argv[1])
print(h)
val = {
2014 Aug 16
7
[hivex] [PATCH 0/6] Python fixes for node_set_value
Hi,
This patch series is based on a prior patch[1], splitting off changes as
requested and incorporating feedback from Richard Jones. It introduces type
validation to avoid segmentation faults (instead, it reports an exception) and
fixes handling of the bytes type in Python 3.
Major changes since that series:
- Drop newly introduced support for integer types for DWORD/QWORDS
- Reject Unicode
2020 Jul 07
1
Re: [PATCH] python: Add type hints
...-> "int"
> > + | OString _ -> "str"
> > + | OStringList _ -> "List[str]"
> > + in
> > let decl_string =
> > "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
> > +...
2013 Feb 04
1
[PATCH] generator: Add visibility to action struct
...uot;\n";
pr " {\n";
(match ret with
| RErr -> pr " "
| _ -> pr " return "
);
- pr "%s (" name;
+ pr "%s (" f.name;
List.iter (fun arg -> pr "%s, " (name_of_argt arg)) args;
pr "null);\n";
pr " }\n";
@@ -358,14 +358,14 @@ public class GuestFS {
List.iter (
fun alias ->
pr " ";
- generate_java_prototype ~public:true ~semicolon:false alias style;
+ generate_java_...
2016 May 04
9
[PATCH 0/8] python: PEP 8 fixes
Hi,
this series cleans up the Python sources, either static or generated,
including also tests, to make them PEP 8 compliant; see
https://www.python.org/dev/peps/pep-0008/ and tools like pep8.
Almost all the issues reported by pep8 are fixed, reducing the issues
from 3818 to 7.
The changes should have no effect on the actual code, while it will
help Python users with consistency with other
2010 Jul 07
1
[PATCH] hivex: add hivex_set_value api call and ocaml/perl bindings, tests
...RErr, [AHive; ANode "node"; ASetValue; AUnusedFlags]),
+ "set a single (key, value) pair at a given node",
+ "\
+This call can be used to set a single (key, value) pair
+stored in C<node>.
C<node> is the node to modify.";
]
@@ -459,6 +467,7 @@ let name_of_argt = function
| ANode n | AValue n | AString n | AStringNullable n -> n
| AOpenFlags | AUnusedFlags -> "flags"
| ASetValues -> "values"
+ | ASetValue -> "val"
(* Check function names etc. for consistency. *)
let check_functions () =
@@ -806,6 +81...
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 May 04
1
[PATCH] perl: drop %guestfs_introspection stuff
...arg ->
- pr " ";
- pr_type i arg;
- pr ",\n"
- ) args;
- pr " ],\n";
- if optargs <> [] then (
- pr " optargs => {\n";
- iteri (fun i arg ->
- pr " %s => " (name_of_argt arg);
- pr_type i arg;
- pr ",\n"
- ) (args_of_optargs optargs);
- pr " },\n";
- );
- pr " name => \"%s\",\n" name;
- pr " description => %S,\n" shortdesc;
- pr " },\n";
-...
2010 Jul 03
1
[PATCH] hivex: add hivex_set_value api call
...RErr, [AHive; ANode "node"; ASetValue; AUnusedFlags]),
+ "set a single (key, value) pair at a given node",
+ "\
+This call can be used to set a single (key, value) pair
+stored in C<node>.
C<node> is the node to modify.";
]
@@ -459,6 +467,7 @@ let name_of_argt = function
| ANode n | AValue n | AString n | AStringNullable n -> n
| AOpenFlags | AUnusedFlags -> "flags"
| ASetValues -> "values"
+ | ASetValue -> "val"
(* Check function names etc. for consistency. *)
let check_functions () =
@@ -806,6 +81...
2010 Jul 03
1
[PATCH] hivex: add hivex_set_value api call and perl bindings, tests
...RErr, [AHive; ANode "node"; ASetValue; AUnusedFlags]),
+ "set a single (key, value) pair at a given node",
+ "\
+This call can be used to set a single (key, value) pair
+stored in C<node>.
C<node> is the node to modify.";
]
@@ -459,6 +467,7 @@ let name_of_argt = function
| ANode n | AValue n | AString n | AStringNullable n -> n
| AOpenFlags | AUnusedFlags -> "flags"
| ASetValues -> "values"
+ | ASetValue -> "val"
(* Check function names etc. for consistency. *)
let check_functions () =
@@ -806,6 +81...
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.
2012 Jan 20
11
[PATCH 01/10] Revert "Revert "generator: Add CamelName flag""
This reverts commit 3f6ca541c7b24d4c86688a509582cb41a7e0078c.
The original commit was reverted prematurely.
---
generator/generator_actions.ml | 10 +++++-----
generator/generator_checks.ml | 5 +++++
generator/generator_types.ml | 3 +++
3 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml
index
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
2014 Feb 10
5
[PATCH 0/4] add GUID validation (RHBZ#1008417)
Hi,
this patch serie adds a new GUID type in the generator, which would do
the same as String, but also validating (just in the C output) the
passed GUID string.
This allows to reject invalid GUIDs before passing them to low-level
tools.
Pino Toscano (4):
utils: add a function to validate a GUID string
generator: add a GUID parameter type
generator: generate code for parameter validation
2015 Oct 20
3
[PATCH 1/2] generator: add a RelativePathnameList parameter type
...each
+ * filename cannot be NULL, empty, or an absolute path.
+ *)
+ | RelativePathnameList of string
and optargs = optargt list
diff --git a/generator/utils.ml b/generator/utils.ml
index 1b00ce5..5b97b2b 100644
--- a/generator/utils.ml
+++ b/generator/utils.ml
@@ -254,7 +254,7 @@ let name_of_argt = function
| Mountable_or_Path n | String n | OptString n
| StringList n | DeviceList n | Bool n | Int n | Int64 n
| FileIn n | FileOut n | BufferIn n | Key n | Pointer (_, n)
- | GUID n -> n
+ | GUID n | RelativePathnameList n -> n
let name_of_optargt = function
| OBool n |...
2015 Oct 21
2
[PATCH 1/2] generator: add a FilenameList parameter type
...an
+ * a simple file name (i.e. neither absolute nor relative paths).
+ *)
+ | FilenameList of string
and optargs = optargt list
diff --git a/generator/utils.ml b/generator/utils.ml
index 1b00ce5..7d47430 100644
--- a/generator/utils.ml
+++ b/generator/utils.ml
@@ -254,7 +254,7 @@ let name_of_argt = function
| Mountable_or_Path n | String n | OptString n
| StringList n | DeviceList n | Bool n | Int n | Int64 n
| FileIn n | FileOut n | BufferIn n | Key n | Pointer (_, n)
- | GUID n -> n
+ | GUID n | FilenameList n -> n
let name_of_optargt = function
| OBool n | OInt n |...