search for: generate_ocaml_function_typ

Displaying 20 results from an estimated 23 matches for "generate_ocaml_function_typ".

2015 Sep 30
0
[PATCH 2/2] ocaml: Improve ocamldoc.
...handle *) "; List.iter ( - fun { name = name; style = style; non_c_aliases = non_c_aliases } -> + fun ({ name = name; style = style; non_c_aliases = non_c_aliases } as f) -> (match style with | _, [], _ -> pr " method %s : " name; generate_ocaml_function_type ~extra_unit:true style; - pr "\n" + pr "\n"; + generate_doc ~indent:" " f | _, (_::_), _ -> pr " method %s : " name; generate_ocaml_function_type style; - pr "\n" + pr "\n";...
2015 Sep 30
3
[PATCH 1/2] ocaml: Use ocamlfind to run ocamldoc.
Using 'ocamlfind ocamldoc' is much faster than running 'ocamldoc' directly, because ocamlfind will run the native code program 'ocamldoc.opt' if it is available. This change approximately halves the time taken to compile the ocaml bindings. --- ocaml/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am index
2012 Mar 27
3
[PATCH 0/3] Enable FUSE support in the API via 'mount-local' call.
This patch is just for review. It enables FUSE support in the API via two new calls, 'guestfs_mount_local' and 'guestfs_umount_local'. FUSE turns out to be very easy to deadlock (necessitating that the machine be rebooted). Running the test from the third patch is usually an effective way to demonstrate this. However I have not yet managed to produce a simple reproducer that
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
...ee (%s);\n" n - | StringList n | DeviceList n -> + | StringList n | DeviceList n | RelativePathnameList n -> pr " guestfs_int_free_string_list (%s);\n" n; | Bool _ | Int _ | Int64 _ | Pointer _ -> () ) args; @@ -850,7 +850,8 @@ and generate_ocaml_function_type ?(extra_unit = false) (ret, args, optargs) = | FileIn _ | FileOut _ | BufferIn _ | Key _ | GUID _ -> pr "string -> " | OptString _ -> pr "string option -> " - | StringList _ | DeviceList _ -> pr "string array -> " + | StringList...
2015 Oct 21
2
[PATCH 1/2] generator: add a FilenameList parameter type
...uot; free (%s);\n" n - | StringList n | DeviceList n -> + | StringList n | DeviceList n | FilenameList n -> pr " guestfs_int_free_string_list (%s);\n" n; | Bool _ | Int _ | Int64 _ | Pointer _ -> () ) args; @@ -850,7 +850,8 @@ and generate_ocaml_function_type ?(extra_unit = false) (ret, args, optargs) = | FileIn _ | FileOut _ | BufferIn _ | Key _ | GUID _ -> pr "string -> " | OptString _ -> pr "string option -> " - | StringList _ | DeviceList _ -> pr "string array -> " + | StringList...
2013 Feb 04
1
[PATCH] generator: Add visibility to action struct
...ocaml_prototype alias style; pr "\n"; ) non_c_aliases; - ) all_functions_sorted; + ) external_functions_sorted; pr "\ (** {2 Object-oriented API} @@ -203,7 +203,7 @@ class guestfs : ?environment:bool -> ?close_on_exit:bool -> unit -> object generate_ocaml_function_type style; pr "\n" ) non_c_aliases - ) all_functions_sorted; + ) external_functions_sorted; pr "end\n" @@ -268,7 +268,7 @@ let () = fun { name = name; style = style; non_c_aliases = non_c_aliases } -> generate_ocaml_prototype ~is_external:tru...
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
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.
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
2017 Jul 21
0
[PATCH v2 01/23] daemon: Allow parts of the daemon and APIs to be written in OCaml.
...generator. Take a look at F<daemon/file.ml> for an +example. + =back After making these changes, use C<make> to compile. diff --git a/generator/OCaml.ml b/generator/OCaml.ml index 53f105198..853b41bb3 100644 --- a/generator/OCaml.ml +++ b/generator/OCaml.ml @@ -888,3 +888,11 @@ and generate_ocaml_function_type ?(extra_unit = false) (ret, args, optargs) = | RStructList (_, typ) -> pr "%s array" typ | RHashtable _ -> pr "(string * string) list" ) + +(* Structure definitions (again). These are used in the daemon, + * but it's convenient to generate them here. + *)...
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.
2013 Feb 07
12
[PATCH 01/12] generator: Add new Mountable argument type
...e n | Mountable n | Dev_or_Path n | String n + | OptString n | FileIn n | FileOut n | BufferIn n | Key n -> pr " free (%s);\n" n | StringList n | DeviceList n -> pr " ocaml_guestfs_free_strings (%s);\n" n; @@ -712,8 +712,8 @@ and generate_ocaml_function_type ?(extra_unit = false) (ret, args, optargs) = ) optargs; List.iter ( function - | Pathname _ | Device _ | Dev_or_Path _ | String _ | FileIn _ | FileOut _ - | BufferIn _ | Key _ -> pr "string -> " + | Pathname _ | Device _ | Mountable _ | Dev_or_Path _ | String _...
2017 Jun 05
19
[PATCH v3 00/19] Allow APIs to be implemented in OCaml.
v2 was here: https://www.redhat.com/archives/libguestfs/2017-June/msg00008.html This series gets as far as a working (and faster) reimplementation of ‘guestfs_list_filesystems’. I also have another patch series on top of this one which reimplements the inspection APIs inside the daemon, but that needs a bit more work still, since inspection turns out to be a very large piece of code. Rich.
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
...pr " free (%s);\n" n - | StringList n | DeviceList n | FilenameList n -> + | StringList (_, n) -> pr " guestfs_int_free_string_list (%s);\n" n; | Bool _ | Int _ | Int64 _ | Pointer _ -> () ) args; @@ -874,12 +866,9 @@ and generate_ocaml_function_type ?(extra_unit = false) (ret, args, optargs) = ) optargs; List.iter ( function - | Pathname _ | Device _ | Mountable _ - | Dev_or_Path _ | Mountable_or_Path _ | String _ - | FileIn _ | FileOut _ | BufferIn _ | Key _ - | GUID _ -> pr "string -> " + | String _...
2017 Apr 21
4
[PATCH 0/2] generator: Simplify the handling of string parameters.
Very large but mechanical change to the generator. Rich.
2017 Jul 27
23
[PATCH v3 00/23] Reimplement many daemon APIs in OCaml.
I think this fixes everything mentioned: - Added the Optgroups module as suggested. - Remove command temporary files. - Replace command ~flags with ?fold_stdout_on_stderr. - Nest _with_mounted function. - Rebase & retest. Rich.
2017 Jul 21
27
[PATCH v2 00/23] Reimplement many daemon APIs in OCaml.
v1 was posted here: https://www.redhat.com/archives/libguestfs/2017-July/msg00098.html This series now depends on two small patches which I posted separately: https://www.redhat.com/archives/libguestfs/2017-July/msg00207.html https://www.redhat.com/archives/libguestfs/2017-July/msg00209.html v1 -> v2: - Previously changes to generator/daemon.ml were made incrementally through the patch
2017 Jul 14
45
[PATCH 00/27] Reimplement many daemon APIs in OCaml.
Previously posted as part of the mega utilities/inspection series here: https://www.redhat.com/archives/libguestfs/2017-June/msg00232.html What I've done is to extract just the parts related to rewriting daemon APIs in OCaml, rebase them on top of the current master, fix a few things, and recompile and test everything. Rich.
2017 Jun 12
32
[PATCH v5 00/32] Refactor utilities, implement some APIs in OCaml.
This is a combination of: https://www.redhat.com/archives/libguestfs/2017-June/msg00046.html [PATCH 00/12] Refactor utility functions. plus: https://www.redhat.com/archives/libguestfs/2017-June/msg00023.html [PATCH v3 00/19] Allow APIs to be implemented in OCaml. with the second patches rebased on top of the utility refactoring, and some other adjustments and extensions. This passes