search for: generate_ocaml_prototype

Displaying 20 results from an estimated 22 matches for "generate_ocaml_prototype".

2015 Feb 12
4
[PATCH 1/3] gobject: generate deprecation markers
Generate proper deprecation markers for API documentation and introspection annotations. --- generator/gobject.ml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/generator/gobject.ml b/generator/gobject.ml index 5b07edd..e563610 100644 --- a/generator/gobject.ml +++ b/generator/gobject.ml @@ -961,7 +961,8 @@ guestfs_session_close (GuestfsSession *session, GError **err)
2015 Feb 12
0
[PATCH 3/3] ocaml: hide internal methods from apidocs
...@@ -144,9 +144,14 @@ end fun ({ name = name; style = style; deprecated_by = deprecated_by; non_c_aliases = non_c_aliases; shortdesc = shortdesc } as f) -> + let need_doc = is_documented f in + + if not need_doc then + pr "(**/**)\n"; + generate_ocaml_prototype name style; - if is_documented f then ( + if need_doc then ( pr "(** %s" shortdesc; (match deprecated_by with | None -> () @@ -155,14 +160,18 @@ end ); pr " *)\n"; ); - pr "\n"; (* Aliase...
2015 Sep 30
0
[PATCH 2/2] ocaml: Improve ocamldoc.
...recated_by; - non_c_aliases = non_c_aliases; - shortdesc = shortdesc } as f) -> - let need_doc = is_documented f in - - if not need_doc then - pr "(**/**)\n"; - + fun ({ name = name; style = style; non_c_aliases = non_c_aliases } as f) -> generate_ocaml_prototype name style; - - if need_doc then ( - let has_tags = ref false in - - pr "(** %s" shortdesc; - (match deprecated_by with - | None -> () - | Some replacement -> - has_tags := true; - pr "\n\n @deprecated Use {!%...
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
2011 Oct 19
1
[hivex][PATCH 2/8] generator: Add new return type to ABI: RLenValue
...1 and sets errno.\n\n" + | RLenValue -> + pr "\ +Returns a value handle. +On error this returns 0 and sets errno.\n\n" | RLenTypeVal -> pr "\ The value is returned as an array of bytes (of length C<len>). @@ -1622,6 +1629,7 @@ and generate_ocaml_prototype ?(is_external = false) name style = | RString -> pr "string" | RStringList -> pr "string array" | RLenType -> pr "hive_type * int" + | RLenValue -> pr "value * int" | RLenTypeVal -> pr "hive_type * string" | RInt...
2015 May 28
4
[PATCH 1/4] generator: move api_version to a common version_added
This way the version string of each API can be used also in other generator modules. Mostly code motion, no actual behaviour changes. --- generator/c.ml | 21 ++++++++++----------- generator/docstrings.ml | 6 ++++++ 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/generator/c.ml b/generator/c.ml index 63dc09a..a2b9c94 100644 --- a/generator/c.ml +++ b/generator/c.ml @@
2010 Jul 07
1
[PATCH] hivex: add hivex_set_value api call and ocaml/perl bindings, tests
...ues = 0>.\n\n"; + if List.mem ASetValue (snd style) then + pr "C<value> is a single (key, value) pair. + +Existing C<hive_value_h> handles become invalid.\n\n"; + (match fst style with | RErr -> pr "\ @@ -1478,6 +1493,7 @@ and generate_ocaml_prototype ?(is_external = false) name style = | AOpenFlags -> pr "open_flag list -> " | AUnusedFlags -> () | ASetValues -> pr "set_value array -> " + | ASetValue -> pr "set_value -> " ) (snd style); (match fst style with | RErr -&...
2011 Dec 08
0
[hivex] [PATCH 2/8] generator: Add new return type to ABI: RLenValue
...1 and sets errno.\n\n" + | RLenValue -> + pr "\ +Returns a value handle. +On error this returns 0 and sets errno.\n\n" | RLenTypeVal -> pr "\ The value is returned as an array of bytes (of length C<len>). @@ -1622,6 +1629,7 @@ and generate_ocaml_prototype ?(is_external = false) name style = | RString -> pr "string" | RStringList -> pr "string array" | RLenType -> pr "hive_type * int" + | RLenValue -> pr "int * value" | RLenTypeVal -> pr "hive_type * string" | RInt...
2010 Jul 03
1
[PATCH] hivex: add hivex_set_value api call
...ues = 0>.\n\n"; + if List.mem ASetValue (snd style) then + pr "C<value> is a single (key, value) pair. + +Existing C<hive_value_h> handles become invalid.\n\n"; + (match fst style with | RErr -> pr "\ @@ -1478,6 +1493,7 @@ and generate_ocaml_prototype ?(is_external = false) name style = | AOpenFlags -> pr "open_flag list -> " | AUnusedFlags -> () | ASetValues -> pr "set_value array -> " + | ASetValue -> pr "set_value -> " ) (snd style); (match fst style with | RErr -&...
2011 Aug 11
2
[Hivex] [PATCH] Correct 32-bit to 64-bit call
--- generator/generator.ml | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/generator/generator.ml b/generator/generator.ml index 31478cd..de911f1 100755 --- a/generator/generator.ml +++ b/generator/generator.ml @@ -1771,7 +1771,7 @@ static void raise_closed (const char *) Noreturn; pr " rv = copy_type_value (r, len, t);\n"; pr "
2013 Feb 04
1
[PATCH] generator: Add visibility to action struct
...( - fun { name = name; style = style; deprecated_by = deprecated_by; + fun ({ name = name; style = style; deprecated_by = deprecated_by; non_c_aliases = non_c_aliases; - in_docs = in_docs; shortdesc = shortdesc } -> + shortdesc = shortdesc } as f) -> generate_ocaml_prototype name style; - if in_docs then ( + if is_documented f then ( pr "(** %s" shortdesc; (match deprecated_by with | None -> () @@ -152,7 +152,7 @@ val user_cancel : t -> unit generate_ocaml_prototype alias style; pr "\n&q...
2011 Aug 31
1
[PATCH] hivex: Add byte runs for nodes and values
...no.\n\n" + | RLenValue -> + pr "\ +Returns a positive number on success. +On error this returns 0 and sets errno.\n\n" | RLenTypeVal -> pr "\ The value is returned as an array of bytes (of length C<len>). @@ -1586,6 +1640,7 @@ and generate_ocaml_prototype ?(is_external = false) name style = | RErr -> pr "unit" (* all errors are turned into exceptions *) | RErrDispose -> pr "unit" | RHive -> pr "t" + | RSize -> pr "size" | RNode -> pr "node" | RNodeNotFound -> p...
2010 Jul 03
1
[PATCH] hivex: add hivex_set_value api call and perl bindings, tests
...ues = 0>.\n\n"; + if List.mem ASetValue (snd style) then + pr "C<value> is a single (key, value) pair. + +Existing C<hive_value_h> handles become invalid.\n\n"; + (match fst style with | RErr -> pr "\ @@ -1478,6 +1493,7 @@ and generate_ocaml_prototype ?(is_external = false) name style = | AOpenFlags -> pr "open_flag list -> " | AUnusedFlags -> () | ASetValues -> pr "set_value array -> " + | ASetValue -> pr "set_value -> " ) (snd style); (match fst style with | RErr -&...
2017 Oct 04
0
[PATCH 2/9] ocaml: Replace pattern matching { field = field } with { field }.
...80b55d 100644 --- a/generator/OCaml.ml +++ b/generator/OCaml.ml @@ -218,7 +218,7 @@ end (* The actions. *) List.iter ( - fun ({ name = name; style = style; non_c_aliases = non_c_aliases } as f) -> + fun ({ name; style; non_c_aliases } as f) -> generate_doc f (fun () -> generate_ocaml_prototype name style); (* Aliases. *) @@ -269,7 +269,7 @@ class guestfs : ?environment:bool -> ?close_on_exit:bool -> unit -> object "; List.iter ( - fun ({ name = name; style = style; non_c_aliases = non_c_aliases } as f) -> + fun ({ name; style; non_c_aliases } as f) -...
2013 Jan 30
1
[PATCH] Make internal-only functions and structures private
...structs; + ) external_structs; (* Emit a copy_TYPE_list function definition only if that function is used. *) List.iter ( @@ -687,7 +687,7 @@ and generate_ocaml_structure_decls () = ) cols; pr "}\n"; pr "\n" - ) structs + ) external_structs and generate_ocaml_prototype ?(is_external = false) name style = if is_external then pr "external " else pr "val "; diff --git a/generator/python.ml b/generator/python.ml index 5bfb1b1..3863c71 100644 --- a/generator/python.ml +++ b/generator/python.ml @@ -240,7 +240,7 @@ free_strings (char **argv)...
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.
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.
2009 Aug 17
13
total warning-removal for daemon/
The warnings in daemon were aggravating and risky for development (too easy to miss new ones) so I spent some time last week and today working on removing them. The first patch gets us down to almost no warnings with the original -Wall setting. That was by far the hardest part. Once I'd done that, I enabled nearly all of gcc's warnings via gnulib's warnings and manywarnings modules
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.